﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
 xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
 xmlns:themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero" 
 mc:Ignorable="d">

    <!--
  REUXABLES THEMES
  
  Copyright (C) 2007-2010 Nukeation Studios. All rights reserved.
  
  This file is protected by the End-User License Agreement provided at:
  http://reuxables.nukeation.com/files/license.txt
  
  THIS FILE MUST BE COMPILED WITH YOUR EXECUTABLE / ASSEMBLY BEFORE BEING DISTRIBUTED
  THIS NOTICE MUST REMAIN INTACT. DO NOT REMOVE!
  -->


    <Color x:Key="MainColor">#FF8193A4</Color>
    <Color x:Key="WindowColor">#FFC0CAD9</Color>

    <Color x:Key="BlackColor">#FF000000</Color>
    <Color x:Key="WhiteColor">#FFFFFFFF</Color>
    <Color x:Key="NormalBorderColor">#FFE5C365</Color>

    
    <SolidColorBrush x:Key="WhiteBrush" Color="{StaticResource WhiteColor}" />
    <SolidColorBrush x:Key="BlackBrush" Color="{StaticResource BlackColor}" />
    <SolidColorBrush x:Key="WidgetBackgroundBrush"
                     Color="White" />
    <SolidColorBrush x:Key="WindowBrush" Color="{StaticResource WindowColor}" />
    <LinearGradientBrush x:Key="NormalBrush" EndPoint="0,1" StartPoint="0,0">
        <GradientStop Color="#FFE9ECEE" Offset="0.0" />
        <GradientStop Color="#FFD1D8E3" Offset="1.0" />
    </LinearGradientBrush>
    <SolidColorBrush x:Key="NormalBorderBrush" Color="#FF9BA7B7" />

    <LinearGradientBrush x:Key="LightBrush" EndPoint="0,1" StartPoint="0,0">
        <GradientStop Color="#FFF" Offset="0.0" />
        <GradientStop Color="#EEE" Offset="1.0" />
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="MouseOverBrush" EndPoint="0,1" StartPoint="0,0">
        <GradientStop Color="#FFFFFCF2" Offset="0.0" />
        <GradientStop Color="#FFFFECB5" Offset="1.0" />
    </LinearGradientBrush>

    <SolidColorBrush x:Key="PressedBrush" Color="#FFFFE8A6" />

    <SolidColorBrush x:Key="PressedBorderBrush" Color="#FFE5C365" />

    <SolidColorBrush x:Key="SelectedBackgroundBrush" Color="#DDD" />

    <SolidColorBrush x:Key="DisabledForegroundBrush" Color="#888" />
    <SolidColorBrush x:Key="DisabledBackgroundBrush" Color="#EEE" />
    <SolidColorBrush x:Key="DisabledBorderBrush" Color="#AAA" />

    <LinearGradientBrush x:Key="WindowBackgroundBrush" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FF293955" Offset="0" />
        <GradientStop Color="#FF30405C" Offset="1" />
        <GradientStop Color="#FF425A81" Offset="0.4" />
        <GradientStop Color="#FF425A81" Offset="0.6" />
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="DefaultedBorderBrush" EndPoint="0,1" StartPoint="0,0">
        <GradientStop Color="#777" Offset="0.0" />
        <GradientStop Color="#000" Offset="1.0" />
    </LinearGradientBrush>

    <SolidColorBrush x:Key="SolidBorderBrush" Color="#888" />
    <SolidColorBrush x:Key="LightBorderBrush" Color="#AAA" />
    <SolidColorBrush x:Key="LightColorBrush" Color="#DDD" />

    <LinearGradientBrush x:Key="SelectedTabItemBrush" EndPoint="0,1" StartPoint="0,0">
        <GradientStop Color="#FFFFFCF4" Offset="0.0" />
        <GradientStop Color="#FFFFE8A6" Offset="1.0" />
        <GradientStop Color="#FFFFF3CD" Offset="0.49" />
        <GradientStop Color="#FFFFE8A6" Offset="0.5" />
    </LinearGradientBrush>

    <SolidColorBrush x:Key="TabBorderBrush" Color="#FFFFE8A6" />

    <SolidColorBrush x:Key="ComboBoxBorderBrush" Color="#FF8591A2" />

    <LinearGradientBrush x:Key="ItemHoverBrush" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFFFFCF4" Offset="0" />
        <GradientStop Color="#FFFFECB5" Offset="1" />
        <GradientStop Color="#FFFFF3CD" Offset="0.49" />
        <GradientStop Color="#FFFFECB5" Offset="0.5" />
    </LinearGradientBrush>
    <SolidColorBrush x:Key="ItemSelectedBrush" Color="#FFFFE8A6" />
    <SolidColorBrush x:Key="ItemSelectedBorderBrush" Color="#FFE5C365" />

    <LinearGradientBrush x:Key="ItemInactiveBrush" EndPoint="0,1" StartPoint="0,0">
        <GradientStop Color="#FFDEDEDE" Offset="1.0" />
        <GradientStop Color="#FFEDECEC" Offset="0" />
        <GradientStop Color="#FFE6E6E6" Offset="0.5" />
    </LinearGradientBrush>


    <LinearGradientBrush x:Key="MenuPopupBackgroundBrush" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFE9ECEE" Offset="0" />
        <GradientStop Color="#FFD0D7E2" Offset="1" />
    </LinearGradientBrush>
    <SolidColorBrush x:Key="MenuPopupBorderBrush" Color="#FF9BA7B7" />


    <SolidColorBrush x:Key="GlyphBrush" Color="#FF2E3F5D" />

    <SolidColorBrush x:Key="TextBrush" Color="{StaticResource BlackColor}" />

    <Style x:Key="NuclearButtonFocusVisual">
        <Setter Property="Control.Template">
            <Setter.Value>
                <ControlTemplate>
                    <Border>
                        <Rectangle Margin="2" Stroke="#60000000" StrokeThickness="1" StrokeDashArray="1 2" />
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="{x:Type Button}" BasedOn="{x:Null}">
        <Setter Property="FocusVisualStyle" Value="{DynamicResource NuclearButtonFocusVisual}" />
        <Setter Property="Background" Value="{DynamicResource SelectionInactiveBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource SelectionInactiveBorderBrush}" />
        <Setter Property="Template" Value="{DynamicResource NuclearButton}" />
    </Style>

    <ControlTemplate x:Key="NuclearButton" TargetType="{x:Type Button}">
        <ControlTemplate.Resources>
            <Storyboard x:Key="HoverOn">
                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="HoverBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1" />
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
            <Storyboard x:Key="HoverOff">
                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="HoverBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0" />
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
            <Storyboard x:Key="PressedOn">
                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="PressedBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1" />
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
            <Storyboard x:Key="PressedOff">
                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="PressedBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0" />
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
        </ControlTemplate.Resources>

        <Grid x:Name="Grid">
            <Border x:Name="Border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}" CornerRadius="2" />
            <Border x:Name="HoverBorder" BorderBrush="{x:Null}" BorderThickness="1" Background="{DynamicResource SelectedTabItemBrush}" CornerRadius="2" Opacity="0" />
            <Border x:Name="PressedBorder" Opacity="0" Background="{DynamicResource PressedBrush}" BorderBrush="{DynamicResource PressedBorderBrush}" BorderThickness="1" CornerRadius="2" />
            <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" RecognizesAccessKey="True" />
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsKeyboardFocused" Value="true">
                <Setter Property="BorderBrush" TargetName="Border" Value="{DynamicResource ItemSelectedBorderBrush}" />
            </Trigger>
            <Trigger Property="IsMouseOver" Value="true">
                <Trigger.ExitActions>
                    <BeginStoryboard x:Name="HoverOff_BeginStoryboard" Storyboard="{StaticResource HoverOff}" />
                </Trigger.ExitActions>
                <Trigger.EnterActions>
                    <BeginStoryboard Storyboard="{StaticResource HoverOn}" />
                </Trigger.EnterActions>
            </Trigger>
            <Trigger Property="IsPressed" Value="true">
                <Trigger.ExitActions>
                    <BeginStoryboard x:Name="PressedOff_BeginStoryboard" Storyboard="{StaticResource PressedOff}" />
                </Trigger.ExitActions>
                <Trigger.EnterActions>
                    <BeginStoryboard x:Name="PressedOn_BeginStoryboard" Storyboard="{StaticResource PressedOn}" />
                </Trigger.EnterActions>
            </Trigger>
            <Trigger Property="IsEnabled" Value="true" />
            <Trigger Property="IsEnabled" Value="false">
                <Setter Property="Background" Value="{DynamicResource DisabledBackgroundBrush}" TargetName="Border" />
                <Setter Property="BorderBrush" Value="{DynamicResource DisabledBorderBrush}" TargetName="Border" />
                <Setter Property="Foreground" Value="{DynamicResource DisabledForegroundBrush}" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>


    <Style x:Key="AlternateButton" TargetType="{x:Type Button}" BasedOn="{x:Null}">
        <Setter Property="FocusVisualStyle" Value="{DynamicResource NuclearButtonFocusVisual}" />
        <Setter Property="Background" Value="{DynamicResource NormalBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource NormalBorderBrush}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <Grid x:Name="Grid">
                        <Border x:Name="Border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}" />
                        <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" RecognizesAccessKey="True" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsKeyboardFocused" Value="true">
                            <Setter Property="BorderBrush" TargetName="Border" Value="{DynamicResource ItemSelectedBorderBrush}" />
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter Property="Background" Value="{DynamicResource MouseOverBrush}" TargetName="Border" />
                        </Trigger>
                        <Trigger Property="IsPressed" Value="true">
                            <Setter Property="Background" Value="{DynamicResource PressedBrush}" TargetName="Border" />
                            <Setter Property="BorderBrush" Value="{DynamicResource PressedBorderBrush}" TargetName="Border" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="true" />
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Background" Value="{DynamicResource DisabledBackgroundBrush}" TargetName="Border" />
                            <Setter Property="BorderBrush" Value="{DynamicResource DisabledBorderBrush}" TargetName="Border" />
                            <Setter Property="Foreground" Value="{DynamicResource DisabledForegroundBrush}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="SystemButton" TargetType="{x:Type Button}" BasedOn="{x:Null}">
        <Setter Property="FocusVisualStyle" Value="{DynamicResource NuclearButtonFocusVisual}" />
        <Setter Property="Background">
            <Setter.Value>
                <LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
                    <GradientStop Color="#FFD0D0D0" Offset="1.0" />
                    <GradientStop Color="#FFF2F2F2" Offset="0" />
                    <GradientStop Color="#FFECECEC" Offset="0.45" />
                    <GradientStop Color="#FFECECEC" Offset="0.48" />
                    <GradientStop Color="#FFE4E4E4" Offset="0.48" />
                    <GradientStop Color="#FFDBDBDB" Offset="0.5" />
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>
        <Setter Property="BorderBrush" Value="{DynamicResource SelectionInactiveBorderBrush}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <Grid x:Name="Grid">
                        <Border BorderThickness="1" BorderBrush="#FF707070" CornerRadius="3">
                            <Border x:Name="Border" Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}" CornerRadius="2" BorderBrush="White" />
                        </Border>
                        <Border x:Name="DefaultBorder" BorderThickness="1" BorderBrush="#FF3C7FB1" CornerRadius="3" Opacity="0">
                            <Border BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}" CornerRadius="2" BorderBrush="#FF05CDFF">
                                <Border.Background>
                                    <LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
                                        <GradientStop Color="#FFAADBF6" Offset="1.0" />
                                        <GradientStop Color="#FFE7F5FD" Offset="0" />
                                        <GradientStop Color="#FFDBF1FC" Offset="0.45" />
                                        <GradientStop Color="#FFECECEC" Offset="0.48" />
                                        <GradientStop Color="#FFCCEBFD" Offset="0.48" />
                                        <GradientStop Color="#FFBCE5FC" Offset="0.5" />
                                    </LinearGradientBrush>
                                </Border.Background>
                            </Border>
                        </Border>
                        <Border x:Name="PressedBorder" BorderThickness="1" BorderBrush="#FF2C628B" CornerRadius="3" Opacity="0">
                            <Border CornerRadius="2" BorderBrush="#FF8CA1AC" BorderThickness="1,1,0,0">
                                <Border.Background>
                                    <LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
                                        <GradientStop Color="#FF91CCEB" Offset="1.0" />
                                        <GradientStop Color="#FFC2E4F6" Offset="0" />
                                        <GradientStop Color="#FFC2E4F6" Offset="0.45" />
                                        <GradientStop Color="#FFECECEC" Offset="0.48" />
                                        <GradientStop Color="#FFB6DFF5" Offset="0.48" />
                                        <GradientStop Color="#FFA8D9F2" Offset="0.5" />
                                    </LinearGradientBrush>
                                </Border.Background>
                                <Border BorderBrush="#FFB0CDDD" BorderThickness="1,1,0,0" CornerRadius="1" />
                            </Border>
                        </Border>
                        <Border x:Name="HoverBorder" BorderThickness="1" BorderBrush="#FF3C7FB1" CornerRadius="3" Opacity="0">
                            <Border BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}" CornerRadius="2" BorderBrush="White">
                                <Border.Background>
                                    <LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
                                        <GradientStop Color="#FFAADBF6" Offset="1.0" />
                                        <GradientStop Color="#FFE7F5FD" Offset="0" />
                                        <GradientStop Color="#FFDBF1FC" Offset="0.45" />
                                        <GradientStop Color="#FFECECEC" Offset="0.48" />
                                        <GradientStop Color="#FFCCEBFD" Offset="0.48" />
                                        <GradientStop Color="#FFBCE5FC" Offset="0.5" />
                                    </LinearGradientBrush>
                                </Border.Background>
                            </Border>
                        </Border>
                        <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" RecognizesAccessKey="True" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsDefault" Value="True">
                            <Setter Property="Opacity" TargetName="DefaultBorder" Value="1" />
                        </Trigger>
                        <Trigger Property="IsKeyboardFocused" Value="true">
                            <Setter Property="Opacity" TargetName="DefaultBorder" Value="1" />
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter Property="Opacity" TargetName="HoverBorder" Value="1" />
                        </Trigger>
                        <Trigger Property="IsPressed" Value="true">
                            <Setter Property="Opacity" TargetName="PressedBorder" Value="1" />
                            <Setter Property="Opacity" TargetName="HoverBorder" Value="0" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="true" />
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Foreground" Value="{DynamicResource DisabledForegroundBrush}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>


    <Style x:Key="RadioButtonFocusVisual">
        <Setter Property="Control.Template">
            <Setter.Value>
                <ControlTemplate>
                    <Border>
                        <Rectangle Margin="15,0,0,0" Stroke="#60000000" StrokeThickness="1" StrokeDashArray="1 2" />
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="CheckBoxFocusVisual">
        <Setter Property="Control.Template">
            <Setter.Value>
                <ControlTemplate>
                    <Border>
                        <Rectangle Margin="15,0,0,0" Stroke="#60000000" StrokeThickness="1" StrokeDashArray="1 2" />
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <LinearGradientBrush x:Key="SelectionInactiveBrush" EndPoint="0,1" StartPoint="0,0">
        <GradientStop Color="#FFCED4DF" Offset="1.0" />
        <GradientStop Color="#FFFDFDFD" Offset="0" />
        <GradientStop Color="#FFD5DAE3" Offset="0.49" />
        <GradientStop Color="#FFCED4DF" Offset="0.5" />
    </LinearGradientBrush>
    <SolidColorBrush x:Key="SelectionInactiveSolidBrush" Color="#FFCED4DF" />
    <LinearGradientBrush x:Key="CheckBoxInnerBrush" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FF92A0B7" Offset="0" />
        <GradientStop Color="#A8D9D9DA" Offset="1" />
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="CheckBoxInnerHoverBrush" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFFFDE80" Offset="0" />
        <GradientStop Color="White" Offset="1" />
    </LinearGradientBrush>

    <Style TargetType="{x:Type CheckBox}">
        <Setter Property="SnapsToDevicePixels" Value="true" />
        <Setter Property="FocusVisualStyle" Value="{DynamicResource CheckBoxFocusVisual}" />
        <Setter Property="Background" Value="{DynamicResource SelectionInactiveBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource SelectionInactiveSolidBrush}" />
        <Setter Property="Template" Value="{DynamicResource NuclearCheckBox}" />
        <Setter Property="Foreground" Value="Black" />
    </Style>

    <ControlTemplate x:Key="NuclearCheckBox" TargetType="{x:Type CheckBox}">

        <BulletDecorator Background="Transparent">
            <BulletDecorator.Bullet>
                <Grid Width="13" Height="13">
                    <Border x:Name="Border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                        <Border BorderThickness="1" Background="White" BorderBrush="{DynamicResource CheckBoxInnerBrush}" />
                    </Border>
                    <Border x:Name="HoverBorder" Background="{DynamicResource SelectedTabItemBrush}" BorderThickness="1" Opacity="0">
                        <Border Background="{DynamicResource SelectedTabItemBrush}" BorderThickness="1" BorderBrush="{DynamicResource CheckBoxInnerHoverBrush}" />
                    </Border>
                    <Path Stretch="Fill" Stroke="{StaticResource GlyphBrush}" StrokeThickness="2" x:Name="CheckMark" Width="Auto" Data="M-0.32455936,5.7168726 L3.1785986,10.519821 10.465148,2.9112485" Margin="1.639,2.318,2.043,2.5" />
                    <Rectangle Visibility="Hidden" Fill="{DynamicResource GlyphBrush}" Stroke="{x:Null}" x:Name="ThreeState" Margin="3" />
                </Grid>
            </BulletDecorator.Bullet>
            <ContentPresenter RecognizesAccessKey="True" Margin="3,0,0,0" />
        </BulletDecorator>

        <ControlTemplate.Triggers>
            
            <Trigger Property="IsChecked" Value="{x:Null}">
                <Setter Property="Visibility" TargetName="ThreeState" Value="Visible" />
                <Setter Property="Visibility" TargetName="CheckMark" Value="Hidden" />
            </Trigger>


            <Trigger Property="IsChecked" Value="false">
                <Setter Property="Visibility" Value="Collapsed" TargetName="CheckMark" />
            </Trigger>

            <Trigger Property="IsChecked" Value="true">
                <Setter Property="Visibility" Value="Visible" TargetName="CheckMark" />
            </Trigger>

            <Trigger Property="IsMouseOver" Value="true">
                <Setter Property="Opacity" TargetName="HoverBorder" Value="1" />
            </Trigger>
            <Trigger Property="IsPressed" Value="true">
                <Setter Property="Background" Value="{DynamicResource PressedBrush}" TargetName="Border" />
                <Setter Property="BorderBrush" Value="{DynamicResource PressedBorderBrush}" TargetName="Border" />
                <Setter Property="BorderBrush" TargetName="HoverBorder" Value="{DynamicResource PressedBorderBrush}" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="false">
                <Setter Property="Background" Value="{DynamicResource DisabledBackgroundBrush}" TargetName="Border" />
                <Setter Property="BorderBrush" Value="{DynamicResource DisabledBorderBrush}" TargetName="Border" />
            </Trigger>
        </ControlTemplate.Triggers>

    </ControlTemplate>

    <Style TargetType="{x:Type RadioButton}">
        <Setter Property="SnapsToDevicePixels" Value="true" />
        <Setter Property="FocusVisualStyle" Value="{DynamicResource RadioButtonFocusVisual}" />
        <Setter Property="Background" Value="{DynamicResource SelectionInactiveBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource SelectionInactiveSolidBrush}" />
        <Setter Property="Template" Value="{DynamicResource NuclearRadioButton}" />
    </Style>

    <ControlTemplate x:Key="NuclearRadioButton" TargetType="{x:Type RadioButton}">

        <BulletDecorator Background="Transparent">
            <BulletDecorator.Bullet>
                <Grid Width="13" Height="13">
                    <Ellipse x:Name="Ellipse_Border" Fill="{TemplateBinding Background}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="1" />
                    <Ellipse x:Name="InnerEllipse" Fill="{x:Null}" Margin="1" Stroke="{DynamicResource CheckBoxInnerBrush}" />
                    <Ellipse x:Name="HoverEllipse" StrokeThickness="1" Fill="{DynamicResource SelectedTabItemBrush}" Opacity="0" />
                    <Ellipse x:Name="HoverInnerEllipse" Fill="{x:Null}" Stroke="{DynamicResource CheckBoxInnerHoverBrush}" Margin="1" Opacity="0" />
                    <Ellipse Margin="3" x:Name="CheckMark" Stroke="#FF304A7E">
                        <Ellipse.Fill>
                            <LinearGradientBrush EndPoint="0.854,0.854" StartPoint="0.146,0.146">
                                <GradientStop Color="#FF71A0D7" Offset="0.309" />
                                <GradientStop Color="#FF5082EB" Offset="0.61" />
                                <GradientStop Color="#FF335CE8" Offset="1" />
                                <GradientStop Color="#FFD0D4DE" />
                            </LinearGradientBrush>
                        </Ellipse.Fill>
                    </Ellipse>
                </Grid>
            </BulletDecorator.Bullet>
            <ContentPresenter RecognizesAccessKey="True" Margin="3,0,0,0" />
        </BulletDecorator>

        <ControlTemplate.Triggers>
            <Trigger Property="IsChecked" Value="false">
                <Setter Property="Visibility" Value="Collapsed" TargetName="CheckMark" />
            </Trigger>
            <Trigger Property="IsMouseOver" Value="true">
                <Setter Property="Opacity" TargetName="HoverEllipse" Value="1" />
                <Setter Property="Opacity" TargetName="HoverInnerEllipse" Value="1" />
            </Trigger>
            <Trigger Property="IsPressed" Value="true">
                <Setter Property="Fill" Value="{DynamicResource PressedBrush}" TargetName="Ellipse_Border" />
                <Setter Property="Stroke" Value="{DynamicResource GlyphBrush}" TargetName="Ellipse_Border" />
                <Setter Property="Stroke" TargetName="HoverEllipse" Value="{DynamicResource PressedBorderBrush}" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="false">
                <Setter Property="Fill" Value="{DynamicResource DisabledBackgroundBrush}" TargetName="Ellipse_Border" />
                <Setter Property="Stroke" Value="#40000000" TargetName="Ellipse_Border" />
                <Setter Property="Foreground" Value="#80000000" />
            </Trigger>

        </ControlTemplate.Triggers>
    </ControlTemplate>

    <LinearGradientBrush x:Key="ScrollBarBaseBrush" EndPoint="1,0" StartPoint="0,0">
        <GradientStop Color="#FFE1E1E1" Offset="0" />
        <GradientStop Color="#FFEDEDED" Offset="0.2" />
        <GradientStop Color="#FFEDEDED" Offset="0.8" />
        <GradientStop Color="#FFEBEBEB" Offset="1" />
    </LinearGradientBrush>
    <SolidColorBrush x:Key="ScrollBarContentBrush" Color="#FF8991A0" />

    <Style x:Key="NuclearRepeatButton" d:IsControlPart="True" TargetType="{x:Type RepeatButton}" BasedOn="{x:Null}">
        <Setter Property="Background" Value="{DynamicResource SelectionInactiveBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource SelectionInactiveSolidBrush}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type RepeatButton}">
                    <Grid>
                        <Border x:Name="Border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="1" />
                        <ContentPresenter HorizontalAlignment="Center" x:Name="ContentPresenter" VerticalAlignment="Center" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsKeyboardFocused" Value="true">
                            <Setter Property="BorderBrush" TargetName="Border" Value="{DynamicResource PressedBorderBrush}" />
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter Property="Background" TargetName="Border" Value="{DynamicResource SelectedTabItemBrush}" />
                        </Trigger>
                        <Trigger Property="IsPressed" Value="true">
                            <Setter Property="Background" TargetName="Border" Value="{DynamicResource PressedBrush}" />
                            <Setter Property="BorderBrush" TargetName="Border" Value="{DynamicResource PressedBorderBrush}" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Background" Value="{DynamicResource DisabledBackgroundBrush}" TargetName="Border" />
                            <Setter Property="Foreground" Value="{DynamicResource DisabledForegroundBrush}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="BorderThickness" Value="1" />
    </Style>

    <Style x:Key="NuclearThumbStyle" d:IsControlPart="True" TargetType="{x:Type Thumb}" BasedOn="{x:Null}">
        <Setter Property="Background" Value="{StaticResource SelectionInactiveBrush}" />
        <Setter Property="BorderBrush" Value="{StaticResource SelectionInactiveSolidBrush}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Thumb}">
                    <Grid Margin="0,0,0,0" x:Name="Grid">
                        <Rectangle HorizontalAlignment="Stretch" x:Name="Rectangle" VerticalAlignment="Stretch" Width="Auto" Height="Auto" Fill="{TemplateBinding Background}" StrokeThickness="{TemplateBinding BorderBrush}" Stroke="{TemplateBinding BorderBrush}" RadiusX="1" RadiusY="1" />
                        <Rectangle Fill="{x:Null}" Stroke="#FFDEDEDE" Margin="1" RadiusX="0" RadiusY="0" />
                        <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
                            <Path Stretch="Fill" Stroke="{DynamicResource SolidBorderBrush}" Margin="2.912,1,2.76,0" Data="M3.9115646,6.462585 L12.244898,6.462585" Height="1" />
                            <Path Stretch="Fill" Stroke="{DynamicResource SolidBorderBrush}" Margin="2.912,1,2.76,0" Data="M3.9115646,6.462585 L12.244898,6.462585" Height="1" />
                            <Path Stretch="Fill" Stroke="{DynamicResource SolidBorderBrush}" Margin="2.912,1,2.76,0" Data="M3.9115646,6.462585 L12.244898,6.462585" Height="1" />
                            <Path Stretch="Fill" Stroke="{DynamicResource SolidBorderBrush}" Margin="2.912,1,2.76,0" Data="M3.9115646,6.462585 L12.244898,6.462585" Height="1" />
                        </StackPanel>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsFocused" Value="True" />
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Fill" TargetName="Rectangle" Value="{DynamicResource SelectedTabItemBrush}" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False" />
                        <Trigger Property="IsDragging" Value="True">
                            <Setter Property="Fill" TargetName="Rectangle" Value="{DynamicResource PressedBrush}" />
                            <Setter Property="Stroke" TargetName="Rectangle" Value="{DynamicResource PressedBorderBrush}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Background" Value="{DynamicResource SelectionInactiveBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource SelectionInactiveSolidBrush}" />
        <Setter Property="BorderThickness" Value="1" />
    </Style>

    <Style x:Key="NuclearScrollRepeatButtonStyle" d:IsControlPart="True" TargetType="{x:Type RepeatButton}">
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="BorderBrush" Value="Transparent" />
        <Setter Property="IsTabStop" Value="false" />
        <Setter Property="Focusable" Value="false" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type RepeatButton}">
                    <Grid>
                        <Rectangle Fill="{TemplateBinding Background}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="{TemplateBinding BorderThickness}" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>


    <Style TargetType="{x:Type ScrollBar}">
        <Setter Property="Stylus.IsFlicksEnabled" Value="false" />
        <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ScrollBar}">
                    <Grid x:Name="GridRoot" Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}">
                        <Grid.RowDefinitions>
                            <RowDefinition MaxHeight="18" />
                            <RowDefinition Height="0.00001*" />
                            <RowDefinition MaxHeight="18" />
                        </Grid.RowDefinitions>

                        <Border BorderBrush="{x:Null}" Grid.RowSpan="3" Background="{DynamicResource LightBrush}" />

                        <RepeatButton x:Name="DecreaseRepeat" Style="{DynamicResource NuclearRepeatButton}" Command="ScrollBar.LineUpCommand">
                            <Grid>
                                <Path x:Name="DecreaseArrow" StrokeThickness="1" Data="M 0 4 L 8 4 L 4 0 Z" Fill="{DynamicResource ScrollBarContentBrush}" />
                            </Grid>
                        </RepeatButton>

                        <Track Grid.Row="1" x:Name="PART_Track" Orientation="Vertical" IsDirectionReversed="true">
                            <Track.Thumb>
                                <Thumb Style="{DynamicResource NuclearThumbStyle}" Background="{DynamicResource SelectionInactiveBrush}" />
                            </Track.Thumb>
                            <Track.IncreaseRepeatButton>
                                <RepeatButton x:Name="PageUp" Style="{DynamicResource NuclearScrollRepeatButtonStyle}" Command="ScrollBar.PageDownCommand" />
                            </Track.IncreaseRepeatButton>
                            <Track.DecreaseRepeatButton>
                                <RepeatButton x:Name="PageDown" Style="{DynamicResource NuclearScrollRepeatButtonStyle}" Command="ScrollBar.PageUpCommand" />
                            </Track.DecreaseRepeatButton>
                        </Track>

                        <RepeatButton Grid.Row="2" x:Name="IncreaseRepeat" Style="{DynamicResource NuclearRepeatButton}" Command="ScrollBar.LineDownCommand">
                            <Grid>
                                <Path x:Name="IncreaseArrow" StrokeThickness="1" Data="M 0 0 L 4 4 L 8 0 Z" Fill="{DynamicResource ScrollBarContentBrush}" />
                            </Grid>
                        </RepeatButton>
                    </Grid>

                    <ControlTemplate.Triggers>
                        <Trigger Property="Orientation" Value="Horizontal">

                            <Setter Property="LayoutTransform" TargetName="GridRoot">
                                <Setter.Value>
                                    <RotateTransform Angle="-90" />
                                </Setter.Value>
                            </Setter>

                            <Setter TargetName="PART_Track" Property="Orientation" Value="Vertical" />

                            <Setter Property="Command" Value="ScrollBar.LineLeftCommand" TargetName="DecreaseRepeat" />
                            <Setter Property="Command" Value="ScrollBar.LineRightCommand" TargetName="IncreaseRepeat" />
                            <Setter Property="Command" Value="ScrollBar.PageLeftCommand" TargetName="PageDown" />
                            <Setter Property="Command" Value="ScrollBar.PageRightCommand" TargetName="PageUp" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Background" Value="{DynamicResource ScrollBarBaseBrush}" />
    </Style>

    <Style TargetType="{x:Type ScrollViewer}" BasedOn="{x:Null}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ScrollViewer}">
                    <Grid Background="{TemplateBinding Background}">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="*" />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>
                        <ScrollContentPresenter Grid.Column="0" Grid.Row="0" Margin="{TemplateBinding Padding}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" CanContentScroll="{TemplateBinding CanContentScroll}" />

                        <ScrollBar Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}" Grid.Column="0" Grid.Row="1" x:Name="PART_HorizontalScrollBar" Orientation="Horizontal" Value="{Binding HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" ViewportSize="{TemplateBinding ViewportWidth}" Minimum="0" Maximum="{TemplateBinding ScrollableWidth}" AutomationProperties.AutomationId="HorizontalScrollBar" />
                        <ScrollBar Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" Grid.Column="1" Grid.Row="0" x:Name="PART_VerticalScrollBar" Orientation="Vertical" Value="{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" ViewportSize="{TemplateBinding ViewportHeight}" Minimum="0" Maximum="{TemplateBinding ScrollableHeight}" AutomationProperties.AutomationId="VerticalScrollBar" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="{x:Type ListBox}">
        <Setter Property="SnapsToDevicePixels" Value="true" />
        <Setter Property="Background" Value="{DynamicResource WhiteBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource ComboBoxBorderBrush}" />
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
        <Setter Property="ScrollViewer.CanContentScroll" Value="True" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ListBox}">
                    <Grid>
                        <Border x:Name="Border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0" />
                        <ScrollViewer Margin="0" Focusable="false" Background="{TemplateBinding Background}">

                            <StackPanel Margin="0" IsItemsHost="true" />

                        </ScrollViewer>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Background" Value="{DynamicResource DisabledBackgroundBrush}" TargetName="Border" />
                            <Setter Property="BorderBrush" Value="{DynamicResource DisabledBorderBrush}" TargetName="Border" />
                        </Trigger>
                        <Trigger Property="IsGrouping" Value="true">
                            <Setter Property="ScrollViewer.CanContentScroll" Value="false" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>



    <Style d:IsControlPart="True" TargetType="{x:Type ListBoxItem}">
        <Setter Property="SnapsToDevicePixels" Value="true" />
        <Setter Property="OverridesDefaultStyle" Value="true" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ListBoxItem}">
                    <Grid SnapsToDevicePixels="true" Margin="0,1">
                        <Border x:Name="SelectedBorder" BorderThickness="1" Opacity="0" Background="{x:Null}" BorderBrush="{DynamicResource PressedBorderBrush}" CornerRadius="2">
                            <Border BorderBrush="White" BorderThickness="1" Background="{DynamicResource ItemSelectedBrush}" CornerRadius="2" />
                        </Border>
                        <Border x:Name="HoverBorder" BorderThickness="1" Opacity="0" Background="{DynamicResource ItemHoverBrush}" BorderBrush="{DynamicResource ItemSelectedBorderBrush}" CornerRadius="2" />
                        <Border x:Name="SelectedInactiveBorder" BorderThickness="1" Opacity="0" Background="{x:Null}" BorderBrush="{DynamicResource SelectionInactiveSolidBrush}" CornerRadius="2">
                            <Border BorderBrush="White" BorderThickness="1" CornerRadius="2" Background="{DynamicResource ItemInactiveBrush}" />
                        </Border>
                        <ContentPresenter HorizontalAlignment="Stretch" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="5,2,0,2" />
                    </Grid>
                    <ControlTemplate.Triggers>

                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="Selector.IsSelected" Value="True" />
                                <Condition Property="Selector.IsSelectionActive" Value="False" />
                            </MultiTrigger.Conditions>
                            <Setter Property="Opacity" TargetName="SelectedInactiveBorder" Value="1" />
                        </MultiTrigger>

                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Opacity" TargetName="HoverBorder" Value="1" />
                        </Trigger>

                        <Trigger Property="IsSelected" Value="true">
                            <Setter Property="Opacity" TargetName="SelectedBorder" Value="1" />
                        </Trigger>

                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Foreground" Value="{DynamicResource DisabledForegroundBrush}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="ExpanderHeaderFocusVisual">
        <Setter Property="Control.Template">
            <Setter.Value>
                <ControlTemplate>
                    <Border>
                        <Rectangle SnapsToDevicePixels="true" Margin="0" Stroke="Black" StrokeDashArray="1 2" StrokeThickness="1" />
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <LinearGradientBrush x:Key="ExpanderArrowFill" EndPoint="0,1" StartPoint="0,0">
        <GradientStop Color="White" Offset="0" />
        <GradientStop Color="#FFBFBFBF" Offset="0.5" />
        <GradientStop Color="#FF878787" Offset="1" />
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="ExpanderArrowHoverFill" EndPoint="0,1" StartPoint="0,0">
        <GradientStop Color="#FFF0F8FE" Offset="0" />
        <GradientStop Color="#FFE0F3FE" Offset="0.3" />
        <GradientStop Color="#FF6FA7C5" Offset="1" />
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="ExpanderArrowPressedFill" EndPoint="0,1" StartPoint="0,0">
        <GradientStop Color="#FFDCF0FA" Offset="0" />
        <GradientStop Color="#FFC5E6F7" Offset="0.2" />
        <GradientStop Color="#FF5690D0" Offset="1" />
    </LinearGradientBrush>
    <Style x:Key="ExpanderDownHeaderStyle" TargetType="{x:Type ToggleButton}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ToggleButton}">
                    <Border Padding="{TemplateBinding Padding}" Background="{DynamicResource LightBrush}" BorderBrush="{DynamicResource NormalBorderBrush}" BorderThickness="1,1,1,1">
                        <Grid SnapsToDevicePixels="False" Background="Transparent">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="19" />
                                <ColumnDefinition Width="*" />
                            </Grid.ColumnDefinitions>
                            <Rectangle Margin="0,0,0,0" x:Name="Rectangle" Fill="{DynamicResource SelectionInactiveBrush}" Stroke="{DynamicResource NormalBorderBrush}" StrokeThickness="0" />
                            <ContentPresenter SnapsToDevicePixels="True" HorizontalAlignment="Stretch" Margin="4,2,0,2" VerticalAlignment="Center" Grid.Column="1" RecognizesAccessKey="True" />
                            <Path x:Name="path" Fill="Black" Stretch="Fill" HorizontalAlignment="Center" VerticalAlignment="Center" RenderTransformOrigin="0.5,0.5" Data="M7.1009116,7.6452084 L8.3873701,7.6452084 L6.1529946,11.504583 L8.3873701,15.363958 L7.1009116,15.363958 L4.4518228,11.504583 z M3.8339844,7.6452084 L5.0865884,7.6452084 L2.8776042,11.504583 L5.0696616,15.363958 L3.8339844,15.363958 L1.1341146,11.504583 z" Grid.Column="0" Margin="0,7,0,6" Width="7.8" Height="7.7">
                                <Path.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform />
                                        <SkewTransform />
                                        <RotateTransform Angle="-90" />
                                        <TranslateTransform />
                                    </TransformGroup>
                                </Path.RenderTransform>
                            </Path>
                        </Grid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsChecked" Value="true">
                            <Setter Property="RenderTransform" TargetName="path">
                                <Setter.Value>
                                    <TransformGroup>
                                        <ScaleTransform ScaleX="1" ScaleY="-1" />
                                        <SkewTransform AngleX="0" AngleY="0" />
                                        <RotateTransform Angle="90" />
                                        <TranslateTransform />
                                    </TransformGroup>
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter Property="Fill" TargetName="Rectangle" Value="{DynamicResource ItemHoverBrush}" />
                        </Trigger>
                        <Trigger Property="IsPressed" Value="true" >
                            <Setter Property="Fill" TargetName="Rectangle" Value="{DynamicResource PressedBrush}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ExpanderRightHeaderStyle" TargetType="{x:Type ToggleButton}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ToggleButton}">
                    <Border Padding="{TemplateBinding Padding}" Background="{DynamicResource LightBrush}" BorderBrush="{DynamicResource NormalBorderBrush}" BorderThickness="1,1,1,1" CornerRadius="2,2,2,2">
                        <Grid SnapsToDevicePixels="False" Background="Transparent">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="19" />
                                <RowDefinition Height="*" />
                            </Grid.RowDefinitions>
                            <Grid>
                                <Grid.LayoutTransform>
                                    <TransformGroup>
                                        <TransformGroup.Children>
                                            <TransformCollection>
                                                <RotateTransform Angle="-90" />
                                            </TransformCollection>
                                        </TransformGroup.Children>
                                    </TransformGroup>
                                </Grid.LayoutTransform>
                                <Rectangle Margin="0,0,0,0" x:Name="Rectangle" Fill="{DynamicResource NormalBrush}" Stroke="{DynamicResource NormalBorderBrush}" StrokeThickness="0" RadiusX="2" RadiusY="2" />
                                <Path HorizontalAlignment="Center" x:Name="Up_Arrow" VerticalAlignment="Center" Fill="{DynamicResource GlyphBrush}" Data="M 0 0 L 4 4 L 8 0 Z" />
                                <Path Visibility="Collapsed" HorizontalAlignment="Center" x:Name="Down_Arrow" VerticalAlignment="Center" Fill="{DynamicResource GlyphBrush}" Data="M 0 4 L 4 0 L 8 4 Z" />
                            </Grid>
                            <ContentPresenter SnapsToDevicePixels="True" HorizontalAlignment="Center" Margin="2,4,4,0" VerticalAlignment="Top" Grid.Row="1" RecognizesAccessKey="True">
                                <ContentPresenter.LayoutTransform>
                                    <TransformGroup>
                                        <TransformGroup.Children>
                                            <TransformCollection>
                                                <RotateTransform Angle="-90" />
                                            </TransformCollection>
                                        </TransformGroup.Children>
                                    </TransformGroup>
                                </ContentPresenter.LayoutTransform>
                            </ContentPresenter>
                        </Grid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsChecked" Value="true">
                            <Setter Property="Visibility" TargetName="Up_Arrow" Value="Collapsed" />
                            <Setter Property="Visibility" TargetName="Down_Arrow" Value="Visible" />
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter Property="Fill" TargetName="Rectangle" Value="{DynamicResource MouseOverBrush}" />

                        </Trigger>
                        <Trigger Property="IsPressed" Value="true" />
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ExpanderUpHeaderStyle" TargetType="{x:Type ToggleButton}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ToggleButton}">
                    <Border Padding="{TemplateBinding Padding}" CornerRadius="2,2,2,2" BorderThickness="1,1,1,1" Background="{DynamicResource LightBrush}" BorderBrush="{DynamicResource NormalBorderBrush}">
                        <Grid SnapsToDevicePixels="False" Background="Transparent">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="19" />
                                <ColumnDefinition Width="*" />
                            </Grid.ColumnDefinitions>
                            <Grid>
                                <Grid.LayoutTransform>
                                    <TransformGroup>
                                        <TransformGroup.Children>
                                            <TransformCollection>
                                                <RotateTransform Angle="180" />
                                            </TransformCollection>
                                        </TransformGroup.Children>
                                    </TransformGroup>
                                </Grid.LayoutTransform>
                                <Rectangle Margin="0,0,0,0" x:Name="Rectangle" Fill="{DynamicResource NormalBrush}" Stroke="{DynamicResource NormalBorderBrush}" StrokeThickness="0" RadiusX="2" RadiusY="2" />
                                <Path HorizontalAlignment="Center" x:Name="Up_Arrow" VerticalAlignment="Center" Fill="{DynamicResource GlyphBrush}" Data="M 0 0 L 4 4 L 8 0 Z" />
                                <Path Visibility="Collapsed" HorizontalAlignment="Center" x:Name="Down_Arrow" VerticalAlignment="Center" Fill="{DynamicResource GlyphBrush}" Data="M 0 4 L 4 0 L 8 4 Z" />
                            </Grid>
                            <ContentPresenter SnapsToDevicePixels="True" HorizontalAlignment="Left" Margin="4,2,0,2" VerticalAlignment="Center" Grid.Column="1" RecognizesAccessKey="True" />
                        </Grid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsChecked" Value="true">
                            <Setter Property="Visibility" TargetName="Up_Arrow" Value="Collapsed" />
                            <Setter Property="Visibility" TargetName="Down_Arrow" Value="Visible" />
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter Property="Fill" TargetName="Rectangle" Value="{DynamicResource MouseOverBrush}" />

                        </Trigger>
                        <Trigger Property="IsPressed" Value="true" />
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ExpanderLeftHeaderStyle" TargetType="{x:Type ToggleButton}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ToggleButton}">
                    <Border Padding="{TemplateBinding Padding}" CornerRadius="2,2,2,2" Background="{DynamicResource LightBrush}" BorderBrush="{DynamicResource NormalBorderBrush}" BorderThickness="1,1,1,1">
                        <Grid SnapsToDevicePixels="False" Background="Transparent">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="19" />
                                <RowDefinition Height="*" />
                            </Grid.RowDefinitions>
                            <Grid>
                                <Grid.LayoutTransform>
                                    <TransformGroup>
                                        <TransformGroup.Children>
                                            <TransformCollection>
                                                <RotateTransform Angle="90" />
                                            </TransformCollection>
                                        </TransformGroup.Children>
                                    </TransformGroup>
                                </Grid.LayoutTransform>
                                <Rectangle Margin="0,0,0,0" x:Name="Rectangle" Fill="{DynamicResource NormalBrush}" Stroke="{DynamicResource NormalBorderBrush}" StrokeThickness="0" RadiusX="2" RadiusY="2" />
                                <Path HorizontalAlignment="Center" x:Name="Up_Arrow" VerticalAlignment="Center" Fill="{DynamicResource GlyphBrush}" Data="M 0 0 L 4 4 L 8 0 Z" />
                                <Path Visibility="Collapsed" HorizontalAlignment="Center" x:Name="Down_Arrow" VerticalAlignment="Center" Fill="{DynamicResource GlyphBrush}" Data="M 0 4 L 4 0 L 8 4 Z" />
                            </Grid>
                            <ContentPresenter SnapsToDevicePixels="True" HorizontalAlignment="Center" Margin="4,4,2,0" VerticalAlignment="Top" Grid.Row="1" RecognizesAccessKey="True">
                                <ContentPresenter.LayoutTransform>
                                    <TransformGroup>
                                        <TransformGroup.Children>
                                            <TransformCollection>
                                                <RotateTransform Angle="90" />
                                            </TransformCollection>
                                        </TransformGroup.Children>
                                    </TransformGroup>
                                </ContentPresenter.LayoutTransform>
                            </ContentPresenter>
                        </Grid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsChecked" Value="true">
                            <Setter Property="Visibility" TargetName="Up_Arrow" Value="Collapsed" />
                            <Setter Property="Visibility" TargetName="Down_Arrow" Value="Visible" />
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter Property="Fill" TargetName="Rectangle" Value="{DynamicResource MouseOverBrush}" />
                        </Trigger>
                        <Trigger Property="IsPressed" Value="true" />
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <LinearGradientBrush x:Key="ComboBoxPopupBrush" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFE9ECEE" Offset="0" />
        <GradientStop Color="#FFD0D7E2" Offset="1" />
    </LinearGradientBrush>
    <Style TargetType="{x:Type Expander}">
        <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="VerticalContentAlignment" Value="Stretch" />
        <Setter Property="BorderBrush" Value="Transparent" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Expander}">
                    <Border SnapsToDevicePixels="true" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1,1,1,1" CornerRadius="3">
                        <DockPanel>
                            <ToggleButton FontFamily="{TemplateBinding FontFamily}" FontSize="{TemplateBinding FontSize}" FontStretch="{TemplateBinding FontStretch}" FontStyle="{TemplateBinding FontStyle}" FontWeight="{TemplateBinding FontWeight}" Foreground="{TemplateBinding Foreground}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Padding="{TemplateBinding Padding}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" FocusVisualStyle="{StaticResource ExpanderHeaderFocusVisual}" Margin="1,1,1,0" MinHeight="0" MinWidth="0" x:Name="HeaderSite" Style="{StaticResource ExpanderDownHeaderStyle}" Content="{TemplateBinding Header}" ContentTemplate="{TemplateBinding HeaderTemplate}" ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}" IsChecked="{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" DockPanel.Dock="Top" />
                            <Border Visibility="Collapsed" Background="{DynamicResource ComboBoxPopupBrush}" BorderBrush="{DynamicResource SolidBorderBrush}" BorderThickness="1,0,1,1" x:Name="border" Margin="1,1,1,1">
                                <ContentPresenter Focusable="false" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="1,1,1,1" x:Name="ExpandSite" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" DockPanel.Dock="Bottom" />
                            </Border>
                        </DockPanel>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsExpanded" Value="true">
                            <Setter Property="Visibility" TargetName="border" Value="Visible" />
                        </Trigger>
                        <Trigger Property="ExpandDirection" Value="Down" />
                        <Trigger Property="ExpandDirection" Value="Right">
                            <Setter Property="DockPanel.Dock" TargetName="ExpandSite" Value="Right" />
                            <Setter Property="DockPanel.Dock" TargetName="HeaderSite" Value="Left" />
                            <Setter Property="Style" TargetName="HeaderSite" Value="{StaticResource ExpanderRightHeaderStyle}" />
                        </Trigger>
                        <Trigger Property="ExpandDirection" Value="Up">
                            <Setter Property="DockPanel.Dock" TargetName="ExpandSite" Value="Top" />
                            <Setter Property="DockPanel.Dock" TargetName="HeaderSite" Value="Bottom" />
                            <Setter Property="Style" TargetName="HeaderSite" Value="{StaticResource ExpanderUpHeaderStyle}" />
                        </Trigger>
                        <Trigger Property="ExpandDirection" Value="Left">
                            <Setter Property="DockPanel.Dock" TargetName="ExpandSite" Value="Left" />
                            <Setter Property="DockPanel.Dock" TargetName="HeaderSite" Value="Right" />
                            <Setter Property="Style" TargetName="HeaderSite" Value="{StaticResource ExpanderLeftHeaderStyle}" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>


    <ControlTemplate x:Key="ComboBoxToggleButton" TargetType="{x:Type ToggleButton}">
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition />
                <ColumnDefinition Width="15" />
            </Grid.ColumnDefinitions>
            <Rectangle Grid.ColumnSpan="2" HorizontalAlignment="Stretch" x:Name="Rectangle" VerticalAlignment="Stretch" Width="Auto" Height="Auto" Fill="{DynamicResource WhiteBrush}" Stroke="{DynamicResource ComboBoxBorderBrush}" />
            <Rectangle Grid.ColumnSpan="2" HorizontalAlignment="Stretch" x:Name="HoverBorder" VerticalAlignment="Stretch" Width="Auto" Height="Auto" Stroke="{DynamicResource PressedBorderBrush}" Opacity="0" Fill="{DynamicResource ItemHoverBrush}" />
            <Rectangle x:Name="HoverInnerBorder" Grid.Column="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="Auto" Height="Auto" Fill="{DynamicResource WhiteBrush}" Stroke="{DynamicResource PressedBorderBrush}" Opacity="0" />
            <Path Grid.Column="1" HorizontalAlignment="Center" x:Name="Arrow" VerticalAlignment="Center" Fill="{DynamicResource GlyphBrush}" Data="M 0 0 L 4 4 L 8 0 Z" Margin="0,0,2,0" />
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="true">
                <Setter Property="Opacity" TargetName="HoverBorder" Value="1" />
                <Setter Property="Opacity" TargetName="HoverInnerBorder" Value="1" />
            </Trigger>
            <Trigger Property="IsChecked" Value="true">
                <Setter Property="Fill" Value="{DynamicResource PressedBrush}" TargetName="Rectangle" />
                <Setter Property="Opacity" TargetName="HoverInnerBorder" Value="1" />
                <Setter Property="Stroke" TargetName="Rectangle" Value="{DynamicResource PressedBorderBrush}" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
                <Setter Property="Fill" Value="{DynamicResource DisabledBackgroundBrush}" TargetName="Rectangle" />
                <Setter Property="Stroke" Value="{DynamicResource DisabledBorderBrush}" TargetName="Rectangle" />
                <Setter Property="Foreground" Value="{DynamicResource DisabledForegroundBrush}" />
                <Setter Property="Fill" Value="{DynamicResource DisabledForegroundBrush}" TargetName="Arrow" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>


    <ControlTemplate x:Key="ComboBoxTextBox" TargetType="{x:Type TextBox}">
        <Border x:Name="PART_ContentHost" Focusable="False" Background="{TemplateBinding Background}" />
    </ControlTemplate>


    <Style TargetType="{x:Type ComboBox}">
        <Setter Property="SnapsToDevicePixels" Value="true" />
        <Setter Property="Template" Value="{DynamicResource NuclearComboBox}" />
    </Style>

    <ControlTemplate x:Key="NuclearComboBox" TargetType="{x:Type ComboBox}">
        <Grid>
            <ToggleButton Grid.Column="2" Template="{DynamicResource ComboBoxToggleButton}" x:Name="ToggleButton" Focusable="false" IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" ClickMode="Press" />
            <ContentPresenter HorizontalAlignment="Left" Margin="3,3,23,3" x:Name="ContentSite" VerticalAlignment="Center" Content="{TemplateBinding SelectionBoxItem}" ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}" ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}" IsHitTestVisible="False" />

            <TextBox Visibility="Hidden" Template="{DynamicResource ComboBoxTextBox}" HorizontalAlignment="Left" Margin="3,3,23,3" x:Name="PART_EditableTextBox" Style="{x:Null}" VerticalAlignment="Center" Focusable="True" Background="Transparent" IsReadOnly="{TemplateBinding IsReadOnly}" />

            <Popup IsOpen="{TemplateBinding IsDropDownOpen}" Placement="Bottom" x:Name="Popup" Focusable="False" AllowsTransparency="True" PopupAnimation="Slide">
                <Grid MaxHeight="{TemplateBinding MaxDropDownHeight}" MinWidth="{TemplateBinding ActualWidth}" x:Name="DropDown" SnapsToDevicePixels="True">
                    <Border x:Name="DropDownBorder" BorderBrush="{DynamicResource SolidBorderBrush}" BorderThickness="1" Background="{DynamicResource ComboBoxPopupBrush}" />
                    <ScrollViewer x:Name="DropDownScrollViewer" Margin="4,6,4,6">
                        <Grid>
                            <Canvas HorizontalAlignment="Left" Height="0" VerticalAlignment="Top" Width="0">
                                <Rectangle x:Name="OpaqueRect" Fill="{Binding Background, ElementName=DropDownBorder}" Height="{Binding ActualHeight, ElementName=DropDownBorder}" Width="{Binding ActualWidth, ElementName=DropDownBorder}"/>
                            </Canvas>
                            <ItemsPresenter x:Name="ItemsPresenter" KeyboardNavigation.DirectionalNavigation="Contained" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                        </Grid>
                    </ScrollViewer>
                </Grid>
            </Popup>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="HasItems" Value="false">
                <Setter Property="MinHeight" Value="95" TargetName="DropDownBorder" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="false">
                <Setter Property="Foreground" Value="{DynamicResource DisabledForegroundBrush}" />
            </Trigger>
            <Trigger Property="IsGrouping" Value="true">
                <Setter Property="ScrollViewer.CanContentScroll" Value="false" />
            </Trigger>
            <Trigger Property="AllowsTransparency" SourceName="Popup" Value="true">
                <Setter Property="Margin" Value="0,2,0,0" TargetName="DropDownBorder" />
            </Trigger>
            <Trigger Property="IsEditable" Value="true">
                <Setter Property="IsTabStop" Value="false" />
                <Setter Property="Visibility" Value="Visible" TargetName="PART_EditableTextBox" />
                <Setter Property="Visibility" Value="Hidden" TargetName="ContentSite" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>

    <Style d:IsControlPart="True" TargetType="{x:Type ComboBoxItem}">
        <Setter Property="SnapsToDevicePixels" Value="true" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ComboBoxItem}">
                    <Grid SnapsToDevicePixels="true" Margin="0,1">
                        <Border x:Name="HoverBorder" BorderThickness="1" CornerRadius="2" BorderBrush="{DynamicResource ItemSelectedBorderBrush}" Opacity="0" Background="{DynamicResource ItemHoverBrush}" />
                        <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="5,2,0,2" />
                    </Grid>
                    <ControlTemplate.Triggers>

                        <Trigger Property="IsHighlighted" Value="true">
                            <Setter Property="Opacity" TargetName="HoverBorder" Value="1" />
                        </Trigger>

                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Foreground" Value="{DynamicResource DisabledForegroundBrush}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="{x:Type ProgressBar}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ProgressBar}">
                    <ControlTemplate.Resources>
                        <Storyboard x:Key="IndeterminateOn">
                            <PointAnimationUsingKeyFrames Storyboard.TargetProperty="(Panel.Background).(RadialGradientBrush.GradientOrigin)" Storyboard.TargetName="IndeterminateBorder" RepeatBehavior="Forever">
                                <EasingPointKeyFrame KeyTime="0:0:0.1" Value="-0.338,1.031"/>
                                <EasingPointKeyFrame KeyTime="0:0:0.2" Value="-0.127,1.05"/>
                                <EasingPointKeyFrame KeyTime="0:0:0.3" Value="0.003,1.06"/>
                                <EasingPointKeyFrame KeyTime="0:0:0.4" Value="0.151,1.07"/>
                                <EasingPointKeyFrame KeyTime="0:0:0.5" Value="0.336,1.051"/>
                                <EasingPointKeyFrame KeyTime="0:0:0.6" Value="0.519,1.031"/>
                                <EasingPointKeyFrame KeyTime="0:0:0.7" Value="0.701,1.041"/>
                                <EasingPointKeyFrame KeyTime="0:0:0.8" Value="0.832,1.022"/>
                                <EasingPointKeyFrame KeyTime="0:0:0.9" Value="0.929,1.042"/>
                                <EasingPointKeyFrame KeyTime="0:0:1" Value="1.04,1.032"/>
                                <EasingPointKeyFrame KeyTime="0:0:1.1" Value="1.191,1.032"/>
                                <EasingPointKeyFrame KeyTime="0:0:1.2" Value="1.456,0.993"/>
                                <EasingPointKeyFrame KeyTime="0:0:1.6" Value="1.456,0.993"/>

                            </PointAnimationUsingKeyFrames>
                            <PointAnimationUsingKeyFrames Storyboard.TargetProperty="(Panel.Background).(RadialGradientBrush.Center)" Storyboard.TargetName="IndeterminateBorder" RepeatBehavior="Forever">
                                <EasingPointKeyFrame KeyTime="0:0:0.1" Value="-0.338,1.031"/>
                                <EasingPointKeyFrame KeyTime="0:0:0.2" Value="-0.127,1.05"/>
                                <EasingPointKeyFrame KeyTime="0:0:0.3" Value="0.003,1.06"/>
                                <EasingPointKeyFrame KeyTime="0:0:0.4" Value="0.151,1.07"/>
                                <EasingPointKeyFrame KeyTime="0:0:0.5" Value="0.336,1.051"/>
                                <EasingPointKeyFrame KeyTime="0:0:0.6" Value="0.519,1.031"/>
                                <EasingPointKeyFrame KeyTime="0:0:0.7" Value="0.701,1.041"/>
                                <EasingPointKeyFrame KeyTime="0:0:0.8" Value="0.832,1.022"/>
                                <EasingPointKeyFrame KeyTime="0:0:0.9" Value="0.929,1.042"/>
                                <EasingPointKeyFrame KeyTime="0:0:1" Value="1.04,1.032"/>
                                <EasingPointKeyFrame KeyTime="0:0:1.1" Value="1.191,1.032"/>
                                <EasingPointKeyFrame KeyTime="0:0:1.2" Value="1.456,0.993"/>
                                <EasingPointKeyFrame KeyTime="0:0:1.6" Value="1.456,0.993"/>
                            </PointAnimationUsingKeyFrames>
                        </Storyboard>
                    </ControlTemplate.Resources>
                    <Grid>

                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Determinate"/>
                                <VisualState x:Name="Indeterminate"/>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ValidationStates">
                                <VisualState x:Name="Valid"/>
                                <VisualState x:Name="InvalidFocused"/>
                                <VisualState x:Name="InvalidUnfocused"/>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>

                        <Border x:Name="PART_Track" Background="{DynamicResource WhiteBrush}" BorderBrush="{DynamicResource SolidBorderBrush}" BorderThickness="1" />

                        <Border HorizontalAlignment="Left" x:Name="PART_Indicator" Background="{DynamicResource MouseOverBrush}" BorderBrush="{DynamicResource NormalBorderBrush}" BorderThickness="1" Visibility="Collapsed" />
                        <Border x:Name="IndeterminateBorder" BorderBrush="{x:Null}" BorderThickness="1">
                            <Border.Background>
                                <RadialGradientBrush Center="-0.547,1.021" GradientOrigin="-0.547,1.021">
                                    <GradientStop Color="{DynamicResource NormalBorderColor}" Offset="0.154"/>
                                    <GradientStop Offset="1"/>
                                </RadialGradientBrush>
                            </Border.Background>
                        </Border>

                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsIndeterminate" Value="True">
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource IndeterminateOn}"/>
                            </Trigger.EnterActions>
                            <Setter Property="Opacity" TargetName="IndeterminateBorder" Value="1"/>
                            <Setter Property="Visibility" TargetName="PART_Indicator" Value="Collapsed"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="{x:Type TextBox}">
        <Setter Property="KeyboardNavigation.TabNavigation" Value="None" />
        <Setter Property="FocusVisualStyle" Value="{x:Null}" />
        <Setter Property="AllowDrop" Value="true" />
        <Setter Property="Template" Value="{DynamicResource NuclearTextBox}" />
    </Style>

    <ControlTemplate x:Key="NuclearTextBox" TargetType="{x:Type TextBox}">
        <Grid>
            <Rectangle Grid.ColumnSpan="2" HorizontalAlignment="Stretch" x:Name="Rectangle" VerticalAlignment="Stretch" Width="Auto" Height="Auto" Fill="{DynamicResource WhiteBrush}" Stroke="{DynamicResource ComboBoxBorderBrush}" />
            <Rectangle Grid.ColumnSpan="2" HorizontalAlignment="Stretch" x:Name="HoverBorder" VerticalAlignment="Stretch" Width="Auto" Height="Auto" Stroke="{DynamicResource PressedBorderBrush}" Opacity="0" Fill="{DynamicResource ItemHoverBrush}" StrokeThickness="1" />
            <Rectangle x:Name="HoverInnerBorder" Grid.Column="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="Auto" Height="Auto" Fill="{DynamicResource WhiteBrush}" Stroke="{DynamicResource PressedBorderBrush}" Opacity="0" StrokeThickness="1" />
            <ScrollViewer Margin="2" x:Name="PART_ContentHost" Background="{TemplateBinding Background}" />
        </Grid>
        <ControlTemplate.Triggers>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsMouseOver" Value="True" />
                    <Condition Property="IsFocused" Value="False" />
                </MultiTrigger.Conditions>
                <Setter Property="Opacity" TargetName="HoverBorder" Value="0.5" />
                <Setter Property="Opacity" TargetName="HoverInnerBorder" Value="0.5" />

            </MultiTrigger>
            <Trigger Property="IsFocused" Value="True">
                <Setter Property="Opacity" TargetName="HoverBorder" Value="1" />
                <Setter Property="Opacity" TargetName="HoverInnerBorder" Value="1" />

            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
                <Setter Property="Fill" Value="{DynamicResource DisabledBackgroundBrush}" TargetName="Rectangle" />
                <Setter Property="Stroke" Value="{DynamicResource DisabledBackgroundBrush}" TargetName="Rectangle" />
                <Setter Property="Foreground" Value="{DynamicResource DisabledForegroundBrush}" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>

    <Style TargetType="{x:Type PasswordBox}">
        <Setter Property="KeyboardNavigation.TabNavigation" Value="None" />
        <Setter Property="FocusVisualStyle" Value="{x:Null}" />
        <Setter Property="AllowDrop" Value="true" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type PasswordBox}">
                    <Grid>
                        <Rectangle Grid.ColumnSpan="2" HorizontalAlignment="Stretch" x:Name="Rectangle" VerticalAlignment="Stretch" Width="Auto" Height="Auto" Fill="{DynamicResource WhiteBrush}" Stroke="{DynamicResource ComboBoxBorderBrush}" />
                        <Rectangle Grid.ColumnSpan="2" HorizontalAlignment="Stretch" x:Name="HoverBorder" VerticalAlignment="Stretch" Width="Auto" Height="Auto" Stroke="{DynamicResource PressedBorderBrush}" Opacity="0" Fill="{DynamicResource ItemHoverBrush}" StrokeThickness="1" />
                        <Rectangle x:Name="HoverInnerBorder" Grid.Column="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="Auto" Height="Auto" Fill="{DynamicResource WhiteBrush}" Stroke="{DynamicResource PressedBorderBrush}" Opacity="0" StrokeThickness="1" />
                        <ScrollViewer Margin="2" x:Name="PART_ContentHost" Background="{TemplateBinding Background}" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsMouseOver" Value="True" />
                                <Condition Property="IsFocused" Value="False" />
                            </MultiTrigger.Conditions>
                            <Setter Property="Opacity" TargetName="HoverBorder" Value="0.5" />
                            <Setter Property="Opacity" TargetName="HoverInnerBorder" Value="0.5" />

                        </MultiTrigger>
                        <Trigger Property="IsFocused" Value="True">
                            <Setter Property="Opacity" TargetName="HoverBorder" Value="1" />
                            <Setter Property="Opacity" TargetName="HoverInnerBorder" Value="1" />

                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="Fill" Value="{DynamicResource DisabledBackgroundBrush}" TargetName="Rectangle" />
                            <Setter Property="Stroke" Value="{DynamicResource DisabledBackgroundBrush}" TargetName="Rectangle" />
                            <Setter Property="Foreground" Value="{DynamicResource DisabledForegroundBrush}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="{x:Type RichTextBox}">
        <Setter Property="KeyboardNavigation.TabNavigation" Value="None" />
        <Setter Property="FocusVisualStyle" Value="{x:Null}" />
        <Setter Property="AllowDrop" Value="true" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type RichTextBox}">
                    <Grid>
                        <Rectangle Grid.ColumnSpan="2" HorizontalAlignment="Stretch" x:Name="Rectangle" VerticalAlignment="Stretch" Width="Auto" Height="Auto" Fill="{DynamicResource WhiteBrush}" Stroke="{DynamicResource ComboBoxBorderBrush}" />
                        <Rectangle Grid.ColumnSpan="2" HorizontalAlignment="Stretch" x:Name="HoverBorder" VerticalAlignment="Stretch" Width="Auto" Height="Auto" Stroke="{DynamicResource PressedBorderBrush}" Opacity="0" Fill="{DynamicResource ItemHoverBrush}" StrokeThickness="1" />
                        <Rectangle x:Name="HoverInnerBorder" Grid.Column="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="Auto" Height="Auto" Fill="{DynamicResource WhiteBrush}" Stroke="{DynamicResource PressedBorderBrush}" Opacity="0" StrokeThickness="1" />
                        <ScrollViewer Margin="2" x:Name="PART_ContentHost" Background="{TemplateBinding Background}" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsMouseOver" Value="True" />
                                <Condition Property="IsFocused" Value="False" />
                            </MultiTrigger.Conditions>
                            <Setter Property="Opacity" TargetName="HoverBorder" Value="0.5" />
                            <Setter Property="Opacity" TargetName="HoverInnerBorder" Value="0.5" />

                        </MultiTrigger>
                        <Trigger Property="IsFocused" Value="True">
                            <Setter Property="Opacity" TargetName="HoverBorder" Value="1" />
                            <Setter Property="Opacity" TargetName="HoverInnerBorder" Value="1" />

                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="Fill" Value="{DynamicResource DisabledBackgroundBrush}" TargetName="Rectangle" />
                            <Setter Property="Stroke" Value="{DynamicResource DisabledBackgroundBrush}" TargetName="Rectangle" />
                            <Setter Property="Foreground" Value="{DynamicResource DisabledForegroundBrush}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="{x:Type Label}">
        <Setter Property="HorizontalContentAlignment" Value="Left" />
        <Setter Property="VerticalContentAlignment" Value="Top" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Label}">
                    <Grid>
                        <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" RecognizesAccessKey="True" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="false" />
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <LinearGradientBrush x:Key="MenuBrush" EndPoint="0,1" StartPoint="0,0">
        <GradientStop Color="#FFCAD3E2" Offset="0.0" />
        <GradientStop Color="#FFC2CCDB" Offset="0.3" />
        <GradientStop Color="#FFADB9CD" Offset="1" />
    </LinearGradientBrush>

    <Style TargetType="{x:Type Menu}">
        <Setter Property="Background" Value="{DynamicResource MenuBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource NormalBorderBrush}" />
        <Setter Property="SnapsToDevicePixels" Value="True" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Menu}">
                    <Border Padding="{TemplateBinding Padding}">
                    <Grid>
                        <Border Margin="1"  x:Name="Border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" />
                        <StackPanel Background="{TemplateBinding Background}" IsItemsHost="True" ClipToBounds="True" Orientation="Horizontal" />
                    </Grid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="Background" Value="{DynamicResource DisabledBackgroundBrush}" TargetName="Border" />
                            <Setter Property="BorderBrush" Value="{DynamicResource DisabledBorderBrush}" TargetName="Border" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="{x:Type ContextMenu}">
        <Setter Property="Background" Value="{DynamicResource MenuBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource NormalBorderBrush}" />
        <Setter Property="SnapsToDevicePixels" Value="True" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ContextMenu}">
                    <Border Padding="{TemplateBinding Padding}">
                        <Grid>
                            <Border Margin="1"  x:Name="Border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" />
                            <StackPanel Background="{TemplateBinding Background}" IsItemsHost="True" ClipToBounds="True" Orientation="Vertical" />
                        </Grid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="Background" Value="{DynamicResource DisabledBackgroundBrush}" TargetName="Border" />
                            <Setter Property="BorderBrush" Value="{DynamicResource DisabledBorderBrush}" TargetName="Border" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <DropShadowBitmapEffect x:Key="PopupDropShadow" ShadowDepth="1.5" Softness="0.15" />


    <Style TargetType="{x:Type MenuItem}">
        <Setter Property="Padding" Value="1" />
        <Setter Property="HorizontalContentAlignment" Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
        <Setter Property="VerticalContentAlignment" Value="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.MenuTextBrushKey}}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type MenuItem}">
                    <Border x:Name="Border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1" CornerRadius="2">
                        <Grid>

                            <Grid.ColumnDefinitions>
                                <ColumnDefinition x:Name="IconColumn" MinWidth="26" Width="Auto" SharedSizeGroup="MenuItemIconColumnGroup" />
                                <ColumnDefinition Width="*" />
                                <ColumnDefinition x:Name="columnDefinition" Width="37" />
                                <ColumnDefinition Width="Auto" SharedSizeGroup="MenuItemIGTColumnGroup" />
                                <ColumnDefinition Width="14" />
                            </Grid.ColumnDefinitions>
                            <Border Background="#FFE9ECEE" Margin="0,-2,0,0" x:Name="SideArt" />
                            <Border x:Name="HoverBorder" Background="{DynamicResource ItemHoverBrush}" BorderBrush="{DynamicResource ItemSelectedBorderBrush}" BorderThickness="1" CornerRadius="2" Grid.Column="0" Grid.ColumnSpan="5" Opacity="0" />
                            <Border x:Name="HoverBorder_Copy" Background="#FFE9ECEE" BorderBrush="{DynamicResource MenuPopupBorderBrush}" BorderThickness="1,1,1,0" CornerRadius="2,2,0,0" Grid.Column="0" Grid.ColumnSpan="5" Opacity="0" />

                            <ContentPresenter Margin="4,0,4,0" x:Name="Icon" VerticalAlignment="Center" ContentSource="Icon" />

                            <Grid Visibility="Hidden" Margin="4,0,6,0" x:Name="GlyphPanel" VerticalAlignment="Center">
                                <Path x:Name="GlyphPanelpath" VerticalAlignment="Center" Fill="{TemplateBinding Foreground}" Data="M0,2 L0,4.8 L2.5,7.4 L7.1,2.8 L7.1,0 L2.5,4.6 z" FlowDirection="LeftToRight" />
                            </Grid>
                            <ContentPresenter  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Grid.Column="1" Margin="{TemplateBinding Padding}" x:Name="HeaderHost" RecognizesAccessKey="True" ContentSource="Header" />
                            <TextBlock Margin="{TemplateBinding Padding}" HorizontalAlignment="Center" Grid.Column="3" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Text="{TemplateBinding InputGestureText}" />
                            <Grid Grid.Column="4" x:Name="ArrowPanel" VerticalAlignment="Center">
                                <Path x:Name="ArrowPanelPath" VerticalAlignment="Center" Fill="{TemplateBinding Foreground}" Data="M0,0 L0,8 L4,4 z" />
                            </Grid>

                            <Popup IsOpen="{Binding IsSubmenuOpen, RelativeSource={RelativeSource TemplatedParent}}" Placement="Right" x:Name="SubMenuPopup" Focusable="false" AllowsTransparency="true" PopupAnimation="{DynamicResource {x:Static SystemParameters.MenuPopupAnimationKey}}" VerticalOffset="-3">
                                <Grid x:Name="SubMenu">
                                    <Border x:Name="SubMenuBorder" BorderBrush="{DynamicResource MenuPopupBorderBrush}" BorderThickness="1,0,1,1" Background="{DynamicResource MenuPopupBackgroundBrush}" />

                                    <StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Cycle" />
                                </Grid>
                            </Popup>

                        </Grid>
                    </Border>

                    <ControlTemplate.Triggers>

                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSubmenuOpen" Value="True" />
                                <Condition Property="Role" Value="TopLevelHeader" />
                            </MultiTrigger.Conditions>
                            <Setter Property="Opacity" TargetName="HoverBorder_Copy" Value="1" />
                        </MultiTrigger>

                        <Trigger Property="Role" Value="TopLevelHeader">
                            <Setter Property="Margin" Value="0,1,0,1" />
                            <Setter Property="MinWidth" Value="0" TargetName="IconColumn" />
                            <Setter Property="Placement" Value="Bottom" TargetName="SubMenuPopup" />
                            <Setter Property="Visibility" Value="Collapsed" TargetName="ArrowPanel"/>
                            <Setter Property="Visibility" Value="Collapsed" TargetName="GlyphPanel"/>
                            <Setter Property="Margin" TargetName="HeaderHost" Value="3,1,0,1" />
                            <Setter Property="Width" TargetName="columnDefinition" Value="0" />
                            <Setter Property="Opacity" TargetName="SideArt" Value="0" />
                        </Trigger>

                        <Trigger Property="Role" Value="TopLevelItem">
                            <Setter Property="Margin" Value="0,1,0,1" />
                            <Setter Property="MinWidth" Value="0" TargetName="IconColumn" />
                            <Setter Property="Visibility" Value="Collapsed" TargetName="ArrowPanel"/>
                            <Setter Property="Visibility" Value="Collapsed" TargetName="GlyphPanel"/>
                            <Setter Property="Margin" TargetName="HeaderHost" Value="3,1,0,1" />
                            <Setter Property="Width" TargetName="columnDefinition" Value="0" />
                            <Setter Property="Opacity" TargetName="SideArt" Value="0" />
                        </Trigger>

                        <Trigger Property="Role" Value="SubmenuHeader">
                            <Setter Property="DockPanel.Dock" Value="Top" />
                            <Setter Property="Padding" Value="5,2,0,2"/>
                        </Trigger>

                        <Trigger Property="Role" Value="SubmenuItem">
                            <Setter Property="DockPanel.Dock" Value="Top" />
                            <Setter Property="Padding" Value="5,2,0,2"/>
                            <Setter Property="Visibility" Value="Collapsed" TargetName="ArrowPanel" />
                        </Trigger>
                        <Trigger Property="IsSuspendingPopupAnimation" Value="true">
                            <Setter Property="PopupAnimation" Value="None" TargetName="SubMenuPopup" />
                        </Trigger>

                        <Trigger Property="Icon" Value="{x:Null}">
                            <Setter Property="Visibility" Value="Collapsed" TargetName="Icon" />
                        </Trigger>

                        <Trigger Property="IsChecked" Value="true">
                            <Setter Property="Visibility" Value="Visible" TargetName="GlyphPanel" />
                            <Setter Property="Visibility" Value="Collapsed" TargetName="Icon" />
                        </Trigger>

                        <Trigger Property="AllowsTransparency" SourceName="SubMenuPopup" Value="true">
                            <Setter Property="Margin" Value="0,0,3,3" TargetName="SubMenu" />
                            <Setter Property="SnapsToDevicePixels" Value="true" TargetName="SubMenu" />
                            <Setter Property="BitmapEffect" Value="{DynamicResource PopupDropShadow}" TargetName="SubMenuBorder" />
                        </Trigger>

                        <Trigger Property="IsHighlighted" Value="true">
                            <Setter Property="Opacity" TargetName="HoverBorder" Value="1" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="{x:Type Separator}">
        <Setter Property="Height" Value="1" />
        <Setter Property="Margin" Value="0,2,0,2" />
        <Setter Property="Focusable" Value="false" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Separator}">
                    <Border BorderBrush="{DynamicResource SolidBorderBrush}" BorderThickness="1" />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>



    <Style TargetType="{x:Type TabControl}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TabControl}">
                    <Grid ClipToBounds="true" SnapsToDevicePixels="true" KeyboardNavigation.TabNavigation="Local">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition x:Name="ColumnDefinition0" />
                            <ColumnDefinition x:Name="ColumnDefinition1" Width="0" />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" x:Name="RowDefinition0" />
                            <RowDefinition Height="*" x:Name="RowDefinition1" />
                        </Grid.RowDefinitions>
                        <Border CornerRadius="2,2,0,0" Background="{x:Null}" x:Name="border" Margin="5,0,0,-4">
                            <TabPanel x:Name="HeaderPanel" IsItemsHost="true" Panel.ZIndex="1" KeyboardNavigation.TabIndex="1" RenderTransformOrigin="0.5,0.5" Width="Auto" Height="Auto">
                                <TabPanel.LayoutTransform>
                                    <TransformGroup>
                                        <ScaleTransform ScaleX="1" ScaleY="1" />
                                        <SkewTransform AngleX="0" AngleY="0" />
                                        <RotateTransform Angle="0" />
                                        <TranslateTransform X="0" Y="0" />
                                    </TransformGroup>
                                </TabPanel.LayoutTransform>
                                <TabPanel.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform ScaleX="1" ScaleY="1" />
                                        <SkewTransform AngleX="0" AngleY="0" />
                                        <RotateTransform />
                                        <TranslateTransform X="0" Y="0" />
                                    </TransformGroup>
                                </TabPanel.RenderTransform>

                            </TabPanel>
                        </Border>
                        <Border Grid.Row="1" x:Name="ContentPanel" BorderBrush="{DynamicResource TabBorderBrush}" BorderThickness="1,0,1,1" CornerRadius="2" KeyboardNavigation.DirectionalNavigation="Contained" KeyboardNavigation.TabNavigation="Local" KeyboardNavigation.TabIndex="2" Background="{DynamicResource WhiteBrush}">
                            <Grid>
                                <Border x:Name="border1" Height="4" VerticalAlignment="Top" Background="#FFFFE8A6" CornerRadius="2,2,0,0" />
                                <ContentPresenter Margin="4" x:Name="PART_SelectedContentHost" ContentSource="SelectedContent" />
                            </Grid>
                        </Border>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="Selector.IsSelectionActive" Value="False">
                            <Setter Property="Background" TargetName="border1" Value="{DynamicResource SelectionInactiveSolidBrush}" />
                            <Setter Property="BorderBrush" TargetName="ContentPanel" Value="{DynamicResource SelectionInactiveSolidBrush}" />
                        </Trigger>
                        <Trigger Property="ContentStringFormat" Value="{x:Null}" />
                        <Trigger Property="TabStripPlacement" Value="Bottom">
                            <Setter Property="Grid.Row" TargetName="ContentPanel" Value="0" />
                            <Setter Property="Height" TargetName="RowDefinition0" Value="*" />
                            <Setter Property="Height" TargetName="RowDefinition1" Value="Auto" />
                            <Setter Property="Grid.Row" TargetName="border" Value="1" />
                            <Setter Property="CornerRadius" TargetName="ContentPanel" Value="2,2,0,0" />
                            <Setter Property="CornerRadius" TargetName="border" Value="0,0,2,2" />
                        </Trigger>
                        <Trigger Property="TabStripPlacement" Value="Left">

                            <Setter Property="Grid.Row" TargetName="HeaderPanel" Value="0" />
                            <Setter Property="Grid.Row" TargetName="ContentPanel" Value="0" />
                            <Setter Property="Grid.Column" TargetName="ContentPanel" Value="1" />
                            <Setter Property="Width" TargetName="ColumnDefinition0" Value="Auto" />
                            <Setter Property="Width" TargetName="ColumnDefinition1" Value="*" />
                            <Setter Property="Height" TargetName="RowDefinition0" Value="*" />
                            <Setter Property="Height" TargetName="RowDefinition1" Value="0" />
                            <Setter Property="Grid.Column" TargetName="border" Value="0" />
                            <Setter Property="Margin" TargetName="border" Value="0,0,0,0" />
                            <Setter Property="Margin" TargetName="ContentPanel" Value="0,0,0,0" />
                            <Setter Property="CornerRadius" TargetName="border" Value="0,2,2,0" />
                            <Setter Property="CornerRadius" TargetName="ContentPanel" Value="0,2,2,0" />

                        </Trigger>
                        <Trigger Property="TabStripPlacement" Value="Right">
                            <Setter Property="Grid.Row" TargetName="HeaderPanel" Value="0" />
                            <Setter Property="Grid.Row" TargetName="ContentPanel" Value="0" />
                            <Setter Property="Grid.Column" TargetName="ContentPanel" Value="0" />
                            <Setter Property="Width" TargetName="ColumnDefinition0" Value="*" />
                            <Setter Property="Width" TargetName="ColumnDefinition1" Value="Auto" />
                            <Setter Property="Height" TargetName="RowDefinition0" Value="*" />
                            <Setter Property="Height" TargetName="RowDefinition1" Value="0" />
                            <Setter Property="Grid.Column" TargetName="border" Value="1" />
                            <Setter Property="CornerRadius" TargetName="ContentPanel" Value="2,0,0,2" />
                            <Setter Property="CornerRadius" TargetName="border" Value="0,2,2,0" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>




    <Style d:IsControlPart="True" TargetType="{x:Type TabItem}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TabItem}">
                    <Grid x:Name="grid" Margin="0,1,0,3">
                        <Grid.LayoutTransform>
                            <TransformGroup>
                                <ScaleTransform ScaleX="1" ScaleY="1" />
                                <SkewTransform AngleX="0" AngleY="0" />
                                <RotateTransform Angle="0" />
                                <TranslateTransform X="0" Y="0" />
                            </TransformGroup>
                        </Grid.LayoutTransform>
                        <Grid>
                            <Border x:Name="SelectedBorder" BorderBrush="{DynamicResource TabBorderBrush}" BorderThickness="1,1,1,1" CornerRadius="2,2,0,0" Opacity="0" Background="{DynamicResource SelectedTabItemBrush}">
                                <Border.Effect>
                                    <DropShadowEffect Direction="0" ShadowDepth="2" BlurRadius="15" Opacity="0.5" />
                                </Border.Effect>
                            </Border>
                            <Border x:Name="HoverBorder" BorderBrush="#FF9BA7B7" BorderThickness="1,1,1,0" CornerRadius="2,2,0,0" Opacity="0">
                                <Border.Background>


                                    <LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
                                        <GradientStop Color="#FF4B5C74" Offset="1.0" />
                                        <GradientStop Color="#FF707776" Offset="0.5" />
                                    </LinearGradientBrush>


                                </Border.Background>
                            </Border>
                            <Border x:Name="UnFocusedBorder" BorderBrush="#FF9BA7B7" BorderThickness="1,1,1,0" CornerRadius="2,2,0,0" Opacity="0" Background="{DynamicResource SelectionInactiveBrush}" />
                            <ContentPresenter HorizontalAlignment="Center" Margin="12,2,12,2" x:Name="ContentSite" VerticalAlignment="Center" RecognizesAccessKey="True" ContentSource="Header" />
                        </Grid>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected" Value="true" />
                                <Condition Property="IsFocused" Value="False" />

                            </MultiTrigger.Conditions>
                            <Setter Property="Opacity" TargetName="UnFocusedBorder" Value="1" />

                        </MultiTrigger>
                        <Trigger Property="TabStripPlacement" Value="Left">
                            <Setter Property="LayoutTransform" TargetName="grid">
                                <Setter.Value>
                                    <TransformGroup>
                                        <ScaleTransform ScaleX="1" ScaleY="1" />
                                        <SkewTransform AngleX="0" AngleY="0" />
                                        <RotateTransform Angle="-90" />
                                        <TranslateTransform X="0" Y="0" />
                                    </TransformGroup>
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                        <Trigger Property="TabStripPlacement" Value="Right">
                            <Setter Property="LayoutTransform" TargetName="grid">
                                <Setter.Value>
                                    <TransformGroup>
                                        <ScaleTransform ScaleX="1" ScaleY="1" />
                                        <SkewTransform AngleX="0" AngleY="0" />
                                        <RotateTransform Angle="90" />
                                        <TranslateTransform X="0" Y="0" />
                                    </TransformGroup>
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                        <Trigger Property="TabStripPlacement" Value="Bottom">
                            <Setter Property="LayoutTransform" TargetName="ContentSite">
                                <Setter.Value>
                                    <TransformGroup>
                                        <ScaleTransform ScaleX="1" ScaleY="1" />
                                        <SkewTransform AngleX="0" AngleY="0" />
                                        <RotateTransform Angle="180" />
                                        <TranslateTransform X="0" Y="0" />
                                    </TransformGroup>
                                </Setter.Value>
                            </Setter>
                            <Setter Property="LayoutTransform" TargetName="grid">
                                <Setter.Value>
                                    <TransformGroup>
                                        <ScaleTransform ScaleX="1" ScaleY="1" />
                                        <SkewTransform AngleX="0" AngleY="0" />
                                        <RotateTransform Angle="180" />
                                        <TranslateTransform X="0" Y="0" />
                                    </TransformGroup>
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsMouseOver" Value="True" />
                                <Condition Property="Selector.IsSelected" Value="False" />
                            </MultiTrigger.Conditions>
                            <Setter Property="Opacity" TargetName="HoverBorder" Value="1" />
                        </MultiTrigger>
                        <Trigger Property="IsSelected" Value="True">
                            <Setter Property="Panel.ZIndex" Value="100" />
                            <Setter Property="Opacity" TargetName="SelectedBorder" Value="1" />
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsMouseOver" Value="True" SourceName="grid" />
                                <Condition Property="Selector.IsSelected" Value="True" />
                            </MultiTrigger.Conditions>
                        </MultiTrigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="Foreground" Value="{DynamicResource DisabledForegroundBrush}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Foreground" Value="{DynamicResource WhiteBrush}" />
        <Style.Triggers>
            <Trigger Property="Selector.IsSelected" Value="True">
                <Setter Property="Foreground" Value="{DynamicResource BlackBrush}" />
            </Trigger>
        </Style.Triggers>
    </Style>

    <Style x:Key="NuclearSliderThumb" d:IsControlPart="True" TargetType="{x:Type Thumb}">
        <Setter Property="SnapsToDevicePixels" Value="true" />
        <Setter Property="Height" Value="14" />
        <Setter Property="Width" Value="14" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Thumb}">
                    <Grid>
                        <Path x:Name="path" Fill="{StaticResource NormalBrush}" Stretch="Fill" Stroke="{StaticResource NormalBorderBrush}" StrokeThickness="1" Margin="-0.06,0.312,0.112,0.446" VerticalAlignment="Stretch" Height="Auto" Data="M0.041776327,0.31279057 L18.887959,0.34013605 18.75703,11.243745 8.8410569,18.553436 -0.05962883,11.176062 z" />
                        <Path x:Name="HoverPath" Fill="{StaticResource ItemHoverBrush}" Stretch="Fill" Stroke="{StaticResource NormalBorderBrush}" StrokeThickness="1" Margin="-0.06,0.312,0.112,0.446" VerticalAlignment="Stretch" Height="Auto" Data="M0.041776327,0.31279057 L18.887959,0.34013605 18.75703,11.243745 8.8410569,18.553436 -0.05962883,11.176062 z" Opacity="0" />
                        <Path x:Name="PressedPath" Fill="{StaticResource PressedBrush}" Stretch="Fill" Stroke="{StaticResource PressedBorderBrush}" StrokeThickness="1" Margin="-0.06,0.312,0.112,0.446" VerticalAlignment="Stretch" Height="Auto" Data="M0.041776327,0.31279057 L18.887959,0.34013605 18.75703,11.243745 8.8410569,18.553436 -0.05962883,11.176062 z" Opacity="0" />
                        <Path x:Name="path_Copy" Fill="White" Stretch="Fill" StrokeThickness="1" Margin="1,1,1,2" VerticalAlignment="Stretch" Height="Auto" Data="M0.041776327,0.31279057 L18.887959,0.34013605 18.75703,11.243745 8.8410569,18.553436 -0.05962883,11.176062 z" Opacity="0">
                            <Path.Stroke>
                                <SolidColorBrush Color="{StaticResource WhiteColor}" />
                            </Path.Stroke>
                        </Path>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Opacity" TargetName="HoverPath" Value="1"/>
                        </Trigger>
                        <Trigger Property="IsDragging" Value="True">
                            <Setter Property="Opacity" TargetName="PressedPath" Value="1"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Opacity" TargetName="path_Copy" Value="0.5"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="{x:Type Slider}">
        <Setter Property="Background" Value="{DynamicResource LightBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource NormalBorderBrush}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Slider}">
                    <Grid x:Name="GridRoot">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" MinHeight="{TemplateBinding MinHeight}" />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>

                        <TickBar Visibility="Collapsed" x:Name="TopTick" Height="4" SnapsToDevicePixels="True" Placement="Top" Fill="{DynamicResource GlyphBrush}" />
                        <Border Grid.Row="1" Margin="0" x:Name="Border" Height="4" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="2">
                            <Border.Background>
                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                    <GradientStop Color="#FF7E7E7E" Offset="0" />
                                    <GradientStop Color="#FFCCCCCC" Offset="1" />
                                    <GradientStop Color="#FF898989" Offset="0.509" />
                                    <GradientStop Color="#FFCCCCCC" Offset="0.517" />
                                </LinearGradientBrush>
                            </Border.Background>

                        </Border>

                        <Track Grid.Row="1" x:Name="PART_Track">
                            <Track.Thumb>
                                <Thumb Style="{DynamicResource NuclearSliderThumb}" Width="11" Height="15" />
                            </Track.Thumb>
                            <Track.IncreaseRepeatButton>
                                <RepeatButton Style="{DynamicResource NuclearScrollRepeatButtonStyle}" Command="Slider.IncreaseLarge" />
                            </Track.IncreaseRepeatButton>
                            <Track.DecreaseRepeatButton>
                                <RepeatButton Style="{DynamicResource NuclearScrollRepeatButtonStyle}" Command="Slider.DecreaseLarge" />
                            </Track.DecreaseRepeatButton>
                        </Track>

                        <TickBar Visibility="Collapsed" Grid.Row="2" x:Name="BottomTick" Height="4" SnapsToDevicePixels="True" Placement="Bottom" Fill="{TemplateBinding Foreground}" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="TickPlacement" Value="TopLeft">
                            <Setter Property="Visibility" Value="Visible" TargetName="TopTick" />
                        </Trigger>
                        <Trigger Property="TickPlacement" Value="BottomRight">
                            <Setter Property="Visibility" Value="Visible" TargetName="BottomTick" />
                        </Trigger>
                        <Trigger Property="TickPlacement" Value="Both">
                            <Setter Property="Visibility" Value="Visible" TargetName="TopTick" />
                            <Setter Property="Visibility" Value="Visible" TargetName="BottomTick" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Background" Value="{DynamicResource DisabledBackgroundBrush}" TargetName="Border" />
                            <Setter Property="BorderBrush" Value="{DynamicResource DisabledBorderBrush}" TargetName="Border" />
                        </Trigger>

                        <Trigger Property="Orientation" Value="Vertical">
                            <Setter Property="LayoutTransform" TargetName="GridRoot">
                                <Setter.Value>
                                    <RotateTransform Angle="-90" />
                                </Setter.Value>
                            </Setter>
                            <Setter TargetName="PART_Track" Property="Orientation" Value="Horizontal" />
                        </Trigger>

                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="{x:Type TreeView}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TreeView}">
                    <Grid>
                        <Border x:Name="Border" Background="{DynamicResource WindowBackgroundBrush}" BorderBrush="{DynamicResource SolidBorderBrush}" BorderThickness="1" CornerRadius="1">
                            <ScrollViewer Focusable="False" Background="{TemplateBinding Background}" Padding="4" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" CanContentScroll="False">
                                <ItemsPresenter />
                            </ScrollViewer>
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="NuclearTreeViewItemToggleButton" d:IsControlPart="True" TargetType="{x:Type ToggleButton}">
        <Setter Property="Focusable" Value="False" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ToggleButton}">
                    <Grid Width="15" Height="13" Background="Transparent">
                        <Path HorizontalAlignment="Left" Margin="1,1,1,1" x:Name="ExpandPath" VerticalAlignment="Center" Fill="White" Data="M 4 0 L 8 4 L 4 8 Z" Stroke="#FFA6A6A6" />
                        <Path HorizontalAlignment="Left" Margin="1,1,0,1" x:Name="ExpandedPath" VerticalAlignment="Center" Fill="#FF595959" Data="M 4 0 L 8 4 L 4 8 Z" Stroke="#FF262626" RenderTransformOrigin="0.5,0.5" Visibility="Collapsed">
                            <Path.RenderTransform>
                                <TransformGroup>
                                    <ScaleTransform />
                                    <SkewTransform />
                                    <RotateTransform Angle="44" />
                                    <TranslateTransform />
                                </TransformGroup>
                            </Path.RenderTransform>
                        </Path>
                        <Path HorizontalAlignment="Left" Margin="1,1,0,1" x:Name="ExpandPath_Hover" VerticalAlignment="Center" Fill="#FF82DFFB" Data="M 4 0 L 8 4 L 4 8 Z" Stroke="#FF1CC4F7" Visibility="Collapsed" />
                        <Path HorizontalAlignment="Left" Margin="1,1,0,1" x:Name="ExpandedPath_Hover" VerticalAlignment="Center" Fill="#FF82DFFB" Data="M 4 0 L 8 4 L 4 8 Z" Stroke="#FF1CC4F7" RenderTransformOrigin="0.5,0.5" Visibility="Collapsed">
                            <Path.RenderTransform>
                                <TransformGroup>
                                    <ScaleTransform />
                                    <SkewTransform />
                                    <RotateTransform Angle="44" />
                                    <TranslateTransform />
                                </TransformGroup>
                            </Path.RenderTransform>
                        </Path>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsChecked" Value="True" />
                                <Condition Property="IsMouseOver" Value="True" />
                            </MultiTrigger.Conditions>
                            <Setter Property="Visibility" TargetName="ExpandedPath_Hover" Value="Visible" />
                        </MultiTrigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsMouseOver" Value="True" />
                                <Condition Property="IsChecked" Value="False" />
                            </MultiTrigger.Conditions>
                            <Setter Property="Visibility" TargetName="ExpandPath_Hover" Value="Visible" />
                        </MultiTrigger>
                        <Trigger Property="IsChecked" Value="True">
                            <Setter Property="Visibility" Value="Collapsed" TargetName="ExpandPath" />
                            <Setter Property="Visibility" TargetName="ExpandedPath" Value="Visible" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style d:IsControlPart="True" TargetType="{x:Type TreeViewItem}">
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="HorizontalContentAlignment" Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
        <Setter Property="VerticalContentAlignment" Value="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
        <Setter Property="Padding" Value="1,0,0,0" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TreeViewItem}">
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition MinWidth="19" Width="Auto" />
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition />
                        </Grid.RowDefinitions>
                        <ToggleButton x:Name="Expander" Style="{DynamicResource NuclearTreeViewItemToggleButton}" IsChecked="{Binding IsExpanded, RelativeSource={RelativeSource TemplatedParent}}" ClickMode="Press" />
                        <Border Grid.Column="1" x:Name="Selection_Border" BorderThickness="1" BorderBrush="#FF84ACDD" CornerRadius="3" Opacity="0">
                            <Border CornerRadius="2" BorderBrush="#FFF2F8FF" BorderThickness="1">
                                <Border.Background>
                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                        <GradientStop Color="#FFECF5FF" Offset="0" />
                                        <GradientStop Color="#FFD0E5FF" Offset="1" />
                                        <GradientStop Color="#FFDDECFF" Offset="0.5" />
                                    </LinearGradientBrush>
                                </Border.Background>
                            </Border>
                        </Border>
                        <Border Grid.Column="1" x:Name="InactiveBorder" BorderThickness="1" BorderBrush="{DynamicResource SelectionInactiveSolidBrush}" CornerRadius="3" Opacity="0">
                            <Border BorderBrush="#FFFEFEFE" BorderThickness="1" CornerRadius="2" Background="{DynamicResource ItemInactiveBrush}" />
                        </Border>
                        <Border Grid.Column="1" x:Name="HoverBorder" BorderThickness="1" BorderBrush="#FF84ACDD" CornerRadius="3" Opacity="0">
                            <Border CornerRadius="2" BorderBrush="#FFF2F8FF" BorderThickness="1">
                                <Border.Background>
                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                        <GradientStop Color="#FFECF5FF" Offset="0" />
                                        <GradientStop Color="#FFD0E5FF" Offset="1" />
                                        <GradientStop Color="#FFDDECFF" Offset="0.5" />
                                    </LinearGradientBrush>
                                </Border.Background>
                            </Border>
                        </Border>
                        <ContentPresenter Grid.Column="1" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" x:Name="PART_Header" ContentSource="Header" Margin="4,2" />
                        <ItemsPresenter Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="1" x:Name="ItemsHost" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True" SourceName="PART_Header">
                            <Setter Property="Opacity" TargetName="HoverBorder" Value="0.5" />
                        </Trigger>
                        <Trigger Property="IsExpanded" Value="false">
                            <Setter Property="Visibility" Value="Collapsed" TargetName="ItemsHost" />
                        </Trigger>
                        <Trigger Property="HasItems" Value="false">
                            <Setter Property="Visibility" Value="Hidden" TargetName="Expander" />
                        </Trigger>
                        <Trigger Property="IsSelected" Value="true">
                            <Setter Property="Opacity" TargetName="Selection_Border" Value="1" />
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected" Value="true" />
                                <Condition Property="IsSelectionActive" Value="false" />
                            </MultiTrigger.Conditions>
                            <Setter Property="Opacity" TargetName="InactiveBorder" Value="1" />
                            <Setter Property="Opacity" TargetName="Selection_Border" Value="0" />
                        </MultiTrigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>


    <ControlTemplate x:Key="NuclearIconButton" TargetType="{x:Type Button}">

        <Grid x:Name="Grid">
            <Border x:Name="Border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}" />

            <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" RecognizesAccessKey="True" />
        </Grid>

        <ControlTemplate.Triggers>
            <Trigger Property="IsKeyboardFocused" Value="true">
                <Setter Property="BorderBrush" TargetName="Border" Value="{DynamicResource ItemSelectedBorderBrush}" />
            </Trigger>
            <Trigger Property="IsMouseOver" Value="true">
                <Setter Property="Background" TargetName="Border">
                    <Setter.Value>

                        <LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
                            <GradientStop Color="#FFFFFCF4" Offset="0.0" />
                            <GradientStop Color="#FFFFECB5" Offset="1.0" />
                            <GradientStop Color="#FFFFF3CD" Offset="0.49" />
                            <GradientStop Color="#FFFFECB5" Offset="0.5" />
                        </LinearGradientBrush>

                    </Setter.Value>
                </Setter>
                <Setter Property="BorderBrush" TargetName="Border" Value="#FFE5C365" />
            </Trigger>
            <Trigger Property="IsPressed" Value="true">
                <Setter Property="BorderBrush" Value="{DynamicResource PressedBorderBrush}" TargetName="Border" />
                <Setter Property="Background" TargetName="Border" Value="#FFFFE8A6" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="true" />
            <Trigger Property="IsEnabled" Value="false">
                <Setter Property="Background" Value="{DynamicResource DisabledBackgroundBrush}" TargetName="Border" />
                <Setter Property="BorderBrush" Value="{DynamicResource DisabledBorderBrush}" TargetName="Border" />
                <Setter Property="Foreground" Value="{DynamicResource DisabledForegroundBrush}" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <SolidColorBrush x:Key="ToolBarBrush" Color="#FFBCC7D8" />


    <Style x:Key="{x:Static ToolBar.ButtonStyleKey}" TargetType="{x:Type Button}" BasedOn="{x:Null}">
        <Setter Property="FocusVisualStyle" Value="{DynamicResource NuclearButtonFocusVisual}" />
        <Setter Property="Background" Value="{DynamicResource ToolBarBrush}" />
        <Setter Property="BorderBrush" Value="{x:Null}" />
        <Setter Property="FontSize" Value="10" />
        <Setter Property="Template" Value="{DynamicResource NuclearIconButton}" />
        <Setter Property="Margin" Value="2,0" />
    </Style>

    <Style x:Key="{x:Static ToolBar.CheckBoxStyleKey}" TargetType="{x:Type CheckBox}">
        <Setter Property="SnapsToDevicePixels" Value="true" />
        <Setter Property="FocusVisualStyle" Value="{DynamicResource CheckBoxFocusVisual}" />
        <Setter Property="Background" Value="{DynamicResource SelectionInactiveBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource SelectionInactiveSolidBrush}" />
        <Setter Property="FontSize" Value="10" />
        <Setter Property="Template" Value="{DynamicResource NuclearCheckBox}" />
        <Setter Property="Foreground" Value="Black" />
        <Setter Property="Margin" Value="2,0" />
    </Style>

    <Style x:Key="{x:Static ToolBar.RadioButtonStyleKey}" TargetType="{x:Type RadioButton}">
        <Setter Property="SnapsToDevicePixels" Value="true" />
        <Setter Property="FocusVisualStyle" Value="{DynamicResource RadioButtonFocusVisual}" />
        <Setter Property="Background">
            <Setter.Value>
                <SolidColorBrush Color="{DynamicResource WhiteColor}" />
            </Setter.Value>
        </Setter>
        <Setter Property="BorderBrush" Value="{DynamicResource SelectionInactiveSolidBrush}" />
        <Setter Property="FontSize" Value="10" />
        <Setter Property="Template" Value="{DynamicResource NuclearRadioButton}" />
        <Setter Property="Margin" Value="2,0" />
    </Style>

    <Style x:Key="{x:Static ToolBar.ComboBoxStyleKey}" TargetType="{x:Type ComboBox}">
        <Setter Property="SnapsToDevicePixels" Value="true" />
        <Setter Property="FontSize" Value="10" />
        <Setter Property="Template" Value="{DynamicResource NuclearComboBox}" />
        <Setter Property="Margin" Value="2,0" />
    </Style>

    <Style x:Key="{x:Static ToolBar.TextBoxStyleKey}" TargetType="{x:Type TextBox}">
        <Setter Property="KeyboardNavigation.TabNavigation" Value="None" />
        <Setter Property="FocusVisualStyle" Value="{x:Null}" />
        <Setter Property="AllowDrop" Value="true" />
        <Setter Property="FontSize" Value="10" />
        <Setter Property="Template" Value="{DynamicResource NuclearTextBox}" />
        <Setter Property="Margin" Value="2,0" />
    </Style>



    <LinearGradientBrush x:Key="ToolBarHorizontalBackground" EndPoint="0,1" StartPoint="0,0">
        <GradientStop Color="#FFFFFF" Offset="0" />
        <GradientStop Color="#FFFBFF" Offset="0.5" />
        <GradientStop Color="#F7F7F7" Offset="1" />
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="ToolBarToggleButtonHorizontalBackground" EndPoint="0,1" StartPoint="0,0">
        <GradientStop Color="#ECECEC" Offset="0" />
        <GradientStop Color="#DDDDDD" Offset="0.5" />
        <GradientStop Color="#A0A0A0" Offset="1" />
    </LinearGradientBrush>
    <SolidColorBrush x:Key="ToolBarButtonHover" Color="#ffcc00" />
    <SolidColorBrush x:Key="ToolBarGripper" Color="#C6C3C6" />
    <Style x:Key="ToolBarHorizontalOverflowButtonStyle" TargetType="{x:Type ToggleButton}">
        <Setter Property="Background" Value="{StaticResource ToolBarToggleButtonHorizontalBackground}" />
        <Setter Property="MinHeight" Value="0" />
        <Setter Property="MinWidth" Value="0" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ToggleButton}">
                    <Border SnapsToDevicePixels="true" x:Name="Bd" CornerRadius="0,2,2,0" Background="#FFD5DAE3">
                        <Canvas SnapsToDevicePixels="true" HorizontalAlignment="Right" Margin="7,2,2,2" VerticalAlignment="Bottom" Width="6" Height="7">
                            <Path Stroke="White" Data="M 1 1.5 L 6 1.5" />
                            <Path Stroke="{TemplateBinding Foreground}" Data="M 0 0.5 L 5 0.5" />
                            <Path Fill="White" Data="M 0.5 4 L 6.5 4 L 3.5 7 Z" />
                            <Path Fill="{TemplateBinding Foreground}" Data="M -0.5 3 L 5.5 3 L 2.5 6 Z" />
                        </Canvas>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter Property="Background" TargetName="Bd" Value="{DynamicResource MouseOverBrush}" />
                        </Trigger>
                        <Trigger Property="IsKeyboardFocused" Value="true">
                            <Setter Property="Background" TargetName="Bd" Value="{StaticResource ToolBarButtonHover}" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Foreground" Value="{StaticResource ToolBarGripper}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <SolidColorBrush x:Key="ToolBarSubMenuBackground" Color="#FFFDFDFD" />
    <SolidColorBrush x:Key="ToolBarMenuBorder" Color="#FFFFFFFF" />
    <Style x:Key="ToolBarThumbStyle" TargetType="{x:Type Thumb}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Thumb}">
                    <Border SnapsToDevicePixels="True" Background="Transparent" Padding="{TemplateBinding Padding}" CornerRadius="0,0,0,0">
                        <Rectangle>
                            <Rectangle.Fill>
                                <DrawingBrush TileMode="Tile" Viewbox="0,0,4,4" ViewboxUnits="Absolute" Viewport="0,0,4,4" ViewportUnits="Absolute">
                                    <DrawingBrush.Drawing>
                                        <DrawingGroup>
                                            <GeometryDrawing Brush="Black" Geometry="M 1 1 L 1 3 L 3 3 L 3 1 z" />
                                        </DrawingGroup>
                                    </DrawingBrush.Drawing>
                                </DrawingBrush>
                            </Rectangle.Fill>
                        </Rectangle>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter Property="Cursor" Value="SizeAll" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <LinearGradientBrush x:Key="ToolBarToggleButtonVerticalBackground" EndPoint="1,0" StartPoint="0,0">
        <GradientStop Color="#ECECEC" Offset="0" />
        <GradientStop Color="#DDDDDD" Offset="0.5" />
        <GradientStop Color="#A0A0A0" Offset="1" />
    </LinearGradientBrush>
    <Style x:Key="ToolBarVerticalOverflowButtonStyle" TargetType="{x:Type ToggleButton}">
        <Setter Property="Background" Value="{StaticResource ToolBarToggleButtonVerticalBackground}" />
        <Setter Property="MinHeight" Value="0" />
        <Setter Property="MinWidth" Value="0" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ToggleButton}">
                    <Border SnapsToDevicePixels="true" x:Name="Bd" Background="{TemplateBinding Background}" CornerRadius="0,0,3,3">
                        <Canvas SnapsToDevicePixels="true" HorizontalAlignment="Right" Margin="2,7,2,2" VerticalAlignment="Bottom" Width="7" Height="6">
                            <Path Stroke="White" Data="M 1.5 1 L 1.5 6" />
                            <Path Stroke="{TemplateBinding Foreground}" Data="M 0.5 0 L 0.5 5" />
                            <Path Fill="White" Data="M 3.5 0.5 L 7 3.5 L 4 6.5 Z" />
                            <Path Fill="{TemplateBinding Foreground}" Data="M 3 -0.5 L 6 2.5 L 3 5.5 Z" />
                        </Canvas>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter Property="Background" TargetName="Bd" Value="{StaticResource ToolBarButtonHover}" />
                        </Trigger>
                        <Trigger Property="IsKeyboardFocused" Value="true">
                            <Setter Property="Background" TargetName="Bd" Value="{StaticResource ToolBarButtonHover}" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Foreground" Value="{StaticResource ToolBarGripper}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <LinearGradientBrush x:Key="ToolBarVerticalBackground" EndPoint="1,0" StartPoint="0,0">
        <GradientStop Color="#FFFFFF" Offset="0" />
        <GradientStop Color="#FFFBFF" Offset="0.5" />
        <GradientStop Color="#F7F7F7" Offset="1" />
    </LinearGradientBrush>
    <Style TargetType="{x:Type ToolBar}">
        <Setter Property="Background" Value="{StaticResource ToolBarHorizontalBackground}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ToolBar}">
                    <Grid SnapsToDevicePixels="true" Margin="1" x:Name="Grid">
                        <Grid HorizontalAlignment="Right" x:Name="OverflowGrid">
                            <ToggleButton IsEnabled="{TemplateBinding HasOverflowItems}" FocusVisualStyle="{x:Null}" x:Name="OverflowButton" Style="{StaticResource ToolBarHorizontalOverflowButtonStyle}" ClickMode="Press" IsChecked="{Binding IsOverflowOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" />
                            <Popup Focusable="false" AllowsTransparency="true" IsOpen="{Binding IsOverflowOpen, RelativeSource={RelativeSource TemplatedParent}}" Placement="Bottom" PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" StaysOpen="False" x:Name="OverflowPopup">
                                <Border x:Name="Shdw">
                                    <Border BorderThickness="1,1,1,1" Background="{DynamicResource MenuPopupBackgroundBrush}" BorderBrush="{DynamicResource MenuPopupBorderBrush}">
                                        <ToolBarOverflowPanel Focusable="true" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" FocusVisualStyle="{x:Null}" Margin="2" x:Name="PART_ToolBarOverflowPanel" WrapWidth="200" KeyboardNavigation.DirectionalNavigation="Cycle" KeyboardNavigation.TabNavigation="Cycle" />
                                    </Border>
                                </Border>
                            </Popup>
                        </Grid>
                        <Border Margin="0,0,11,0" x:Name="MainPanelBorder" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="2" Padding="{TemplateBinding Padding}" Background="{DynamicResource ToolBarBrush}">
                            <Grid>

                                <DockPanel KeyboardNavigation.TabIndex="1" KeyboardNavigation.TabNavigation="Local">
                                    <Thumb Padding="6,5,1,6" Margin="-3,-1,0,0" x:Name="ToolBarThumb" Style="{StaticResource ToolBarThumbStyle}" Width="10" />
                                    <ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="Center" Margin="4,0,4,0" x:Name="ToolBarHeader" VerticalAlignment="Center" ContentSource="Header" />
                                    <ToolBarPanel SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Margin="0,1,2,2" x:Name="PART_ToolBarPanel" IsItemsHost="true" Background="{DynamicResource ToolBarBrush}" />
                                </DockPanel>
                            </Grid>
                        </Border>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsOverflowOpen" Value="true">
                            <Setter Property="IsEnabled" TargetName="ToolBarThumb" Value="false" />
                        </Trigger>
                        <Trigger Property="Header" Value="{x:Null}">
                            <Setter Property="Visibility" TargetName="ToolBarHeader" Value="Collapsed" />
                        </Trigger>
                        <Trigger Property="ToolBarTray.IsLocked" Value="true">
                            <Setter Property="Visibility" TargetName="ToolBarThumb" Value="Collapsed" />
                        </Trigger>
                        <Trigger Property="HasDropShadow" SourceName="OverflowPopup" Value="true">
                            <Setter Property="Margin" TargetName="Shdw" Value="0,0,5,5" />
                            <Setter Property="SnapsToDevicePixels" TargetName="Shdw" Value="true" />
                            <Setter Property="Background" TargetName="Shdw" Value="#71000000" />
                        </Trigger>
                        <Trigger Property="Orientation" Value="Vertical">
                            <Setter Property="Margin" TargetName="Grid" Value="1,3,1,1" />
                            <Setter Property="Style" TargetName="OverflowButton" Value="{StaticResource ToolBarVerticalOverflowButtonStyle}" />
                            <Setter Property="Height" TargetName="ToolBarThumb" Value="10" />
                            <Setter Property="Width" TargetName="ToolBarThumb" Value="Auto" />
                            <Setter Property="Margin" TargetName="ToolBarThumb" Value="-1,-3,0,0" />
                            <Setter Property="Padding" TargetName="ToolBarThumb" Value="5,6,6,1" />
                            <Setter Property="Margin" TargetName="ToolBarHeader" Value="0,0,0,4" />
                            <Setter Property="Margin" TargetName="PART_ToolBarPanel" Value="1,0,2,2" />
                            <Setter Property="DockPanel.Dock" TargetName="ToolBarThumb" Value="Top" />
                            <Setter Property="DockPanel.Dock" TargetName="ToolBarHeader" Value="Top" />
                            <Setter Property="HorizontalAlignment" TargetName="OverflowGrid" Value="Stretch" />
                            <Setter Property="VerticalAlignment" TargetName="OverflowGrid" Value="Bottom" />
                            <Setter Property="Placement" TargetName="OverflowPopup" Value="Right" />
                            <Setter Property="Margin" TargetName="MainPanelBorder" Value="0,0,0,11" />
                            <Setter Property="Background" Value="{StaticResource ToolBarVerticalBackground}" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Foreground" Value="#FF000000" />
        <Setter Property="BorderBrush" Value="{DynamicResource NormalBorderBrush}" />
        <Setter Property="BorderThickness" Value="1,1,0,1" />
    </Style>

    <BorderGapMaskConverter x:Key="BorderGapMaskConverter" />
    <SolidColorBrush x:Key="SelectionInactiveBorderBrush" Color="#FF8A919C" />
    <Style TargetType="{x:Type GroupBox}">
        <Setter Property="BorderBrush" Value="#D5DFE5" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type GroupBox}">
                    <Grid SnapsToDevicePixels="true">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="6" />
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="6" />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="*" />
                            <RowDefinition Height="6" />
                        </Grid.RowDefinitions>
                        <Border Grid.ColumnSpan="4" Grid.RowSpan="4" Background="{DynamicResource LightBrush}" BorderThickness="1,1,1,1" />
                        <Border Grid.ColumnSpan="4" Grid.Row="1" Grid.RowSpan="3" BorderThickness="1,1,1,1" BorderBrush="{DynamicResource SelectionInactiveBorderBrush}">
                            <Border.OpacityMask>
                                <MultiBinding Converter="{StaticResource BorderGapMaskConverter}" ConverterParameter="7">
                                    <Binding Path="ActualWidth" ElementName="Header" />
                                    <Binding Path="ActualWidth" RelativeSource="{RelativeSource Self}" />
                                    <Binding Path="ActualHeight" RelativeSource="{RelativeSource Self}" />
                                </MultiBinding>
                            </Border.OpacityMask>
                            <Border BorderThickness="{TemplateBinding BorderThickness}">

                                <Border BorderThickness="{TemplateBinding BorderThickness}" />
                            </Border>
                        </Border>
                        <Border Grid.Column="0" Grid.ColumnSpan="4" Grid.Row="1" Grid.RowSpan="3" Background="{TemplateBinding Background}" BorderBrush="Transparent" BorderThickness="{TemplateBinding BorderThickness}" />
                        <Border Grid.ColumnSpan="4" Grid.RowSpan="2" Background="{DynamicResource SelectionInactiveBrush}" BorderThickness="1,1,1,0" x:Name="Main" BorderBrush="{DynamicResource SelectionInactiveBorderBrush}" />

                        <Border x:Name="Header" Grid.Column="1" Grid.Row="0" Grid.RowSpan="2" Padding="3,1,3,0">
                            <ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" ContentSource="Header" RecognizesAccessKey="True" Margin="0,4,0,4" />
                        </Border>

                        <ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Margin="{TemplateBinding Padding}" Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="2" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Foreground" Value="{DynamicResource TextBrush}" />
    </Style>

    <SolidColorBrush x:Key="ListBorder" Color="#828790" />
    <Style x:Key="{x:Static GridView.GridViewScrollViewerStyleKey}" TargetType="{x:Type ScrollViewer}">
        <Setter Property="Focusable" Value="false" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ScrollViewer}">
                    <Grid SnapsToDevicePixels="true" Background="{TemplateBinding Background}">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="*" />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>
                        <DockPanel Margin="{TemplateBinding Padding}">
                            <ScrollViewer Focusable="false" DockPanel.Dock="Top" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden">
                                <GridViewHeaderRowPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Margin="2,0,2,0" AllowsColumnReorder="{Binding TemplatedParent.View.AllowsColumnReorder, RelativeSource={RelativeSource TemplatedParent}}" ColumnHeaderContainerStyle="{Binding TemplatedParent.View.ColumnHeaderContainerStyle, RelativeSource={RelativeSource TemplatedParent}}" ColumnHeaderContextMenu="{Binding TemplatedParent.View.ColumnHeaderContextMenu, RelativeSource={RelativeSource TemplatedParent}}" ColumnHeaderTemplate="{Binding TemplatedParent.View.ColumnHeaderTemplate, RelativeSource={RelativeSource TemplatedParent}}" ColumnHeaderTemplateSelector="{Binding TemplatedParent.View.ColumnHeaderTemplateSelector, RelativeSource={RelativeSource TemplatedParent}}" ColumnHeaderToolTip="{Binding TemplatedParent.View.ColumnHeaderToolTip, RelativeSource={RelativeSource TemplatedParent}}" Columns="{Binding TemplatedParent.View.Columns, RelativeSource={RelativeSource TemplatedParent}}" />

                            </ScrollViewer>
                            <ScrollContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" x:Name="PART_ScrollContentPresenter" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" CanContentScroll="{TemplateBinding CanContentScroll}" KeyboardNavigation.DirectionalNavigation="Local" />
                        </DockPanel>
                        <ScrollBar Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}" Cursor="Arrow" x:Name="PART_HorizontalScrollBar" Grid.Row="1" Orientation="Horizontal" ViewportSize="{TemplateBinding ViewportWidth}" Maximum="{TemplateBinding ScrollableWidth}" Minimum="0.0" Value="{Binding HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" />
                        <ScrollBar Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" Cursor="Arrow" x:Name="PART_VerticalScrollBar" Grid.Column="1" Orientation="Vertical" ViewportSize="{TemplateBinding ViewportHeight}" Maximum="{TemplateBinding ScrollableHeight}" Minimum="0.0" Value="{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" />
                        <DockPanel Grid.Column="1" Grid.Row="1" Background="{Binding Background, ElementName=PART_VerticalScrollBar}" LastChildFill="false">
                            <Rectangle Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" Width="1" Fill="White" DockPanel.Dock="Left" />
                            <Rectangle Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}" Height="1" Fill="White" DockPanel.Dock="Top" />
                        </DockPanel>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="{x:Type ListView}">
        <Setter Property="Background" Value="{DynamicResource WhiteBrush}" />
        <Setter Property="BorderBrush" Value="{StaticResource ComboBoxBorderBrush}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="Foreground" Value="#FF042271" />
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
        <Setter Property="ScrollViewer.CanContentScroll" Value="true" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ListView}">
                    <Border x:Name="Bd" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="0,0,0,0" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}">

                        <ScrollViewer Padding="{TemplateBinding Padding}" Style="{DynamicResource {x:Static GridView.GridViewScrollViewerStyleKey}}">
                            <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                        </ScrollViewer>
                    </Border>

                    <ControlTemplate.Triggers>
                        <Trigger Property="IsGrouping" Value="true">
                            <Setter Property="ScrollViewer.CanContentScroll" Value="false" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Background" TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ListViewItemFocusVisual">
        <Setter Property="Control.Template">
            <Setter.Value>
                <ControlTemplate>
                    <Rectangle Stroke="#8E6EA6F5" StrokeThickness="1" RadiusX="2" RadiusY="2" />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="ListViewItemSingleColumnStyle" TargetType="{x:Type ListViewItem}">
        <Setter Property="FocusVisualStyle" Value="{StaticResource ListViewItemFocusVisual}" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="BorderBrush" Value="Transparent" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="Margin" Value="0,0,0,1" />
        <Setter Property="Padding" Value="5,2,5,2" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ListViewItem}">
                    <Border SnapsToDevicePixels="true" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="2" x:Name="border">

                        <Grid Margin="2,0,2,0">
                            <Border x:Name="SelectedBorder" BorderThickness="1" Opacity="0" Background="{x:Null}" BorderBrush="{DynamicResource PressedBorderBrush}" CornerRadius="2">
                                <Border BorderBrush="White" BorderThickness="1" Background="{DynamicResource ItemSelectedBrush}" CornerRadius="2" />
                            </Border>
                            <Border x:Name="HoverBorder" BorderThickness="1" Opacity="0" Background="{DynamicResource ItemHoverBrush}" BorderBrush="{DynamicResource ItemSelectedBorderBrush}" CornerRadius="2" />
                            <Border x:Name="SelectedInactiveBorder" BorderThickness="1" Opacity="0" Background="{x:Null}" BorderBrush="{DynamicResource SelectionInactiveSolidBrush}" CornerRadius="2">
                                <Border BorderBrush="White" BorderThickness="1" CornerRadius="2" Background="{DynamicResource ItemInactiveBrush}" />
                            </Border>
                            <Rectangle Opacity="0.05" Stroke="{x:Null}" RadiusX="2" RadiusY="2" Height="Auto" Margin="1,1,1,1" VerticalAlignment="Stretch" x:Name="rectangle" Fill="{DynamicResource NormalBrush}" />
                            <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                        </Grid>

                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsSelected" Value="true">
                            <Setter Property="Opacity" TargetName="SelectedBorder" Value="1" />

                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Opacity" TargetName="HoverBorder" Value="1" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Foreground" Value="{DynamicResource DisabledForegroundBrush}" />
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected" Value="true" />
                                <Condition Property="Selector.IsSelectionActive" Value="false" />
                            </MultiTrigger.Conditions>
                            <Setter Property="Opacity" TargetName="SelectedInactiveBorder" Value="1" />

                        </MultiTrigger>

                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Foreground" Value="{DynamicResource TextBrush}" />
    </Style>

    <Style x:Key="ListViewItemGridViewStyle" TargetType="{x:Type ListViewItem}">
        <Setter Property="FocusVisualStyle" Value="{StaticResource ListViewItemFocusVisual}" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="BorderBrush" Value="Transparent" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="Margin" Value="0,0,0,1" />
        <Setter Property="Padding" Value="5,2,5,2" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ListViewItem}">
                    <Border SnapsToDevicePixels="true" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="2" x:Name="border">

                        <Grid Margin="2,0,2,0">
                            <Border x:Name="SelectedBorder" BorderThickness="1" Opacity="0" Background="{x:Null}" BorderBrush="{DynamicResource PressedBorderBrush}" CornerRadius="2">
                                <Border BorderBrush="White" BorderThickness="1" Background="{DynamicResource ItemSelectedBrush}" CornerRadius="2" />
                            </Border>
                            <Border x:Name="HoverBorder" BorderThickness="1" Opacity="0" Background="{DynamicResource ItemHoverBrush}" BorderBrush="{DynamicResource ItemSelectedBorderBrush}" CornerRadius="2" />
                            <Border x:Name="SelectedInactiveBorder" BorderThickness="1" Opacity="0" Background="{x:Null}" BorderBrush="{DynamicResource SelectionInactiveSolidBrush}" CornerRadius="2">
                                <Border BorderBrush="White" BorderThickness="1" CornerRadius="2" Background="{DynamicResource ItemInactiveBrush}" />
                            </Border>
                            <Rectangle Opacity="0.05" Stroke="{x:Null}" RadiusX="2" RadiusY="2" Height="Auto" Margin="1,1,1,1" VerticalAlignment="Stretch" x:Name="rectangle" Fill="{DynamicResource NormalBrush}" />
                            <GridViewRowPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Margin="0,2,0,2" VerticalAlignment="Stretch" />
                        </Grid>

                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsSelected" Value="true">
                            <Setter Property="Opacity" TargetName="SelectedBorder" Value="1" />

                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Opacity" TargetName="HoverBorder" Value="1" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Foreground" Value="{DynamicResource DisabledForegroundBrush}" />
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected" Value="true" />
                                <Condition Property="Selector.IsSelectionActive" Value="false" />
                            </MultiTrigger.Conditions>
                            <Setter Property="Opacity" TargetName="SelectedInactiveBorder" Value="1" />

                        </MultiTrigger>

                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Foreground" Value="{DynamicResource TextBrush}" />
    </Style>


    <Style x:Key="GridViewColumnHeaderGripper" TargetType="{x:Type Thumb}">
        <Setter Property="Canvas.Right" Value="-8.5" />
        <Setter Property="Width" Value="18" />
        <Setter Property="Height" Value="{Binding ActualHeight, RelativeSource={RelativeSource TemplatedParent}}" />
        <Setter Property="Padding" Value="0,3,0,4" />
        <Setter Property="Background" Value="{DynamicResource LightBrush}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Thumb}">
                    <Border Padding="{TemplateBinding Padding}">
                        <Rectangle HorizontalAlignment="Center" Width="0.5">
                            <Rectangle.Fill>
                                <SolidColorBrush Color="{DynamicResource WhiteColor}" />
                            </Rectangle.Fill>
                        </Rectangle>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="{x:Type GridViewColumnHeader}" TargetType="{x:Type GridViewColumnHeader}">
        <Setter Property="HorizontalContentAlignment" Value="Center" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="Background" Value="{DynamicResource SelectionInactiveBrush}" />
        <Setter Property="Padding" Value="2,0,2,0" />
        <Setter Property="Foreground" Value="{DynamicResource TextBrush}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type GridViewColumnHeader}">
                    <Grid Margin="0,1,0,1">
                        <Grid>

                            <Border x:Name="Main" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" CornerRadius="0,0,0,0" />
                            <Rectangle Opacity="1" Stroke="{x:Null}" RadiusX="0" RadiusY="0" Margin="2,2,2,2" VerticalAlignment="Stretch" Height="Auto" x:Name="Shine">
                                <Rectangle.Fill>
                                    <LinearGradientBrush EndPoint="0.5,0.971" StartPoint="0.5,0.042">
                                        <GradientStop Color="#26FFFFFF" Offset="0" />
                                        <GradientStop Color="#00FFFFFF" Offset="1" />
                                        <GradientStop Color="#26FFFFFF" Offset="0.467" />
                                        <GradientStop Color="#00FFFFFF" Offset="0.475" />
                                    </LinearGradientBrush>
                                </Rectangle.Fill>
                            </Rectangle>

                            <Border BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}">
                                <Border.BorderBrush>
                                    <SolidColorBrush Color="{DynamicResource WhiteColor}" />
                                </Border.BorderBrush>
                                <ContentPresenter VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" RecognizesAccessKey="True" Margin="2,2,2,2" />
                            </Border>
                        </Grid>
                        <Canvas>
                            <Thumb x:Name="PART_HeaderGripper" Style="{StaticResource GridViewColumnHeaderGripper}" Margin="0,0,7,0" Width="Auto" HorizontalAlignment="Stretch" />
                        </Canvas>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter TargetName="PART_HeaderGripper" Property="Background" Value="Transparent" />
                            <Setter Property="Background" TargetName="Main" Value="{DynamicResource SelectedTabItemBrush}" />
                        </Trigger>
                        <Trigger Property="IsPressed" Value="true">
                            <Setter TargetName="PART_HeaderGripper" Property="Visibility" Value="Hidden" />
                            <Setter Property="Background" Value="SkyBlue" />
                            <Setter Property="Background" TargetName="Main" Value="{DynamicResource PressedBrush}" />
                            <Setter Property="BorderBrush" TargetName="Main" Value="{DynamicResource PressedBorderBrush}" />
                        </Trigger>
                        <Trigger Property="Height" Value="Auto">
                            <Setter Property="MinHeight" Value="20" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
                        </Trigger>
                        <Trigger Property="Role" Value="Padding">
                            <Setter TargetName="PART_HeaderGripper" Property="Visibility" Value="Collapsed" />
                        </Trigger>
                        <Trigger Property="Role" Value="Floating">
                            <Setter TargetName="PART_HeaderGripper" Property="Visibility" Value="Collapsed" />
                            <Setter Property="Background" Value="Yellow" />
                            <Setter Property="Foreground" Value="{DynamicResource MouseOverBrush}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="BorderBrush" Value="{DynamicResource SelectionInactiveBorderBrush}" />
    </Style>
    <Style x:Key="TabControl2" TargetType="{x:Type TabControl}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TabControl}">
                    <Grid ClipToBounds="true" SnapsToDevicePixels="true" KeyboardNavigation.TabNavigation="Local">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition x:Name="ColumnDefinition0" />
                            <ColumnDefinition x:Name="ColumnDefinition1" Width="0" />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" x:Name="RowDefinition0" />
                            <RowDefinition Height="*" x:Name="RowDefinition1" />
                        </Grid.RowDefinitions>
                        <Border CornerRadius="2,2,0,0" Background="{x:Null}" x:Name="border" Margin="4,0,0,-4">
                            <TabPanel x:Name="HeaderPanel" IsItemsHost="true" Panel.ZIndex="1" KeyboardNavigation.TabIndex="1" RenderTransformOrigin="0.5,0.5" Width="Auto" Height="Auto">
                                <TabPanel.LayoutTransform>
                                    <TransformGroup>
                                        <ScaleTransform ScaleX="1" ScaleY="1" />
                                        <SkewTransform AngleX="0" AngleY="0" />
                                        <RotateTransform Angle="0" />
                                        <TranslateTransform X="0" Y="0" />
                                    </TransformGroup>
                                </TabPanel.LayoutTransform>
                                <TabPanel.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform ScaleX="1" ScaleY="1" />
                                        <SkewTransform AngleX="0" AngleY="0" />
                                        <RotateTransform />
                                        <TranslateTransform X="0" Y="0" />
                                    </TransformGroup>
                                </TabPanel.RenderTransform>

                            </TabPanel>
                        </Border>
                        <Border Grid.Row="1" x:Name="ContentPanel" BorderBrush="{DynamicResource WhiteBrush}" BorderThickness="1,0,1,1" CornerRadius="2" KeyboardNavigation.DirectionalNavigation="Contained" KeyboardNavigation.TabNavigation="Local" KeyboardNavigation.TabIndex="2" Background="{DynamicResource WhiteBrush}">
                            <Grid>
                                <ContentPresenter Margin="4" x:Name="PART_SelectedContentHost" ContentSource="SelectedContent" />
                            </Grid>
                        </Border>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="Selector.IsSelectionActive" Value="False">
                            <Setter Property="BorderBrush" TargetName="ContentPanel" Value="{DynamicResource SelectionInactiveSolidBrush}" />
                        </Trigger>
                        <Trigger Property="ContentStringFormat" Value="{x:Null}" />
                        <Trigger Property="TabStripPlacement" Value="Bottom">
                            <Setter Property="Grid.Row" TargetName="ContentPanel" Value="0" />
                            <Setter Property="Height" TargetName="RowDefinition0" Value="*" />
                            <Setter Property="Height" TargetName="RowDefinition1" Value="Auto" />
                            <Setter Property="Grid.Row" TargetName="border" Value="1" />
                            <Setter Property="CornerRadius" TargetName="ContentPanel" Value="2,2,0,0" />
                            <Setter Property="CornerRadius" TargetName="border" Value="0,0,2,2" />
                        </Trigger>
                        <Trigger Property="TabStripPlacement" Value="Left">

                            <Setter Property="Grid.Row" TargetName="HeaderPanel" Value="0" />
                            <Setter Property="Grid.Row" TargetName="ContentPanel" Value="0" />
                            <Setter Property="Grid.Column" TargetName="ContentPanel" Value="1" />
                            <Setter Property="Width" TargetName="ColumnDefinition0" Value="Auto" />
                            <Setter Property="Width" TargetName="ColumnDefinition1" Value="*" />
                            <Setter Property="Height" TargetName="RowDefinition0" Value="*" />
                            <Setter Property="Height" TargetName="RowDefinition1" Value="0" />
                            <Setter Property="Grid.Column" TargetName="border" Value="0" />
                            <Setter Property="Margin" TargetName="border" Value="0,0,0,0" />
                            <Setter Property="Margin" TargetName="ContentPanel" Value="0,0,0,0" />
                            <Setter Property="CornerRadius" TargetName="border" Value="0,2,2,0" />
                            <Setter Property="CornerRadius" TargetName="ContentPanel" Value="0,2,2,0" />

                        </Trigger>
                        <Trigger Property="TabStripPlacement" Value="Right">
                            <Setter Property="Grid.Row" TargetName="HeaderPanel" Value="0" />
                            <Setter Property="Grid.Row" TargetName="ContentPanel" Value="0" />
                            <Setter Property="Grid.Column" TargetName="ContentPanel" Value="0" />
                            <Setter Property="Width" TargetName="ColumnDefinition0" Value="*" />
                            <Setter Property="Width" TargetName="ColumnDefinition1" Value="Auto" />
                            <Setter Property="Height" TargetName="RowDefinition0" Value="*" />
                            <Setter Property="Height" TargetName="RowDefinition1" Value="0" />
                            <Setter Property="Grid.Column" TargetName="border" Value="1" />
                            <Setter Property="CornerRadius" TargetName="ContentPanel" Value="2,0,0,2" />
                            <Setter Property="CornerRadius" TargetName="border" Value="0,2,2,0" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="TabItem2" d:IsControlPart="True" TargetType="{x:Type TabItem}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TabItem}">
                    <Grid x:Name="grid" Margin="0,1,0,3">
                        <Grid.LayoutTransform>
                            <TransformGroup>
                                <ScaleTransform ScaleX="1" ScaleY="1" />
                                <SkewTransform AngleX="0" AngleY="0" />
                                <RotateTransform Angle="0" />
                                <TranslateTransform X="0" Y="0" />
                            </TransformGroup>
                        </Grid.LayoutTransform>
                        <Grid>
                            <Border x:Name="SelectedBorder" BorderBrush="{DynamicResource WhiteBrush}" BorderThickness="1,1,1,1" CornerRadius="2,2,0,0" Opacity="0" Background="{DynamicResource WhiteBrush}" />
                            <Border x:Name="HoverBorder" BorderBrush="#FF9BA7B7" BorderThickness="1,1,1,0" CornerRadius="2,2,0,0" Opacity="0">
                                <Border.Background>


                                    <LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
                                        <GradientStop Color="#FF4B5C74" Offset="1.0" />
                                        <GradientStop Color="#FF707776" Offset="0.5" />
                                    </LinearGradientBrush>


                                </Border.Background>
                            </Border>
                            <ContentPresenter HorizontalAlignment="Center" Margin="12,2,12,2" x:Name="ContentSite" VerticalAlignment="Center" RecognizesAccessKey="True" ContentSource="Header" />
                        </Grid>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected" Value="true" />
                                <Condition Property="IsFocused" Value="False" />

                            </MultiTrigger.Conditions>

                        </MultiTrigger>
                        <Trigger Property="TabStripPlacement" Value="Left">
                            <Setter Property="LayoutTransform" TargetName="grid">
                                <Setter.Value>
                                    <TransformGroup>
                                        <ScaleTransform ScaleX="1" ScaleY="1" />
                                        <SkewTransform AngleX="0" AngleY="0" />
                                        <RotateTransform Angle="-90" />
                                        <TranslateTransform X="0" Y="0" />
                                    </TransformGroup>
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                        <Trigger Property="TabStripPlacement" Value="Right">
                            <Setter Property="LayoutTransform" TargetName="grid">
                                <Setter.Value>
                                    <TransformGroup>
                                        <ScaleTransform ScaleX="1" ScaleY="1" />
                                        <SkewTransform AngleX="0" AngleY="0" />
                                        <RotateTransform Angle="90" />
                                        <TranslateTransform X="0" Y="0" />
                                    </TransformGroup>
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                        <Trigger Property="TabStripPlacement" Value="Bottom">
                            <Setter Property="LayoutTransform" TargetName="ContentSite">
                                <Setter.Value>
                                    <TransformGroup>
                                        <ScaleTransform ScaleX="1" ScaleY="1" />
                                        <SkewTransform AngleX="0" AngleY="0" />
                                        <RotateTransform Angle="180" />
                                        <TranslateTransform X="0" Y="0" />
                                    </TransformGroup>
                                </Setter.Value>
                            </Setter>
                            <Setter Property="LayoutTransform" TargetName="grid">
                                <Setter.Value>
                                    <TransformGroup>
                                        <ScaleTransform ScaleX="1" ScaleY="1" />
                                        <SkewTransform AngleX="0" AngleY="0" />
                                        <RotateTransform Angle="180" />
                                        <TranslateTransform X="0" Y="0" />
                                    </TransformGroup>
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsMouseOver" Value="True" />
                                <Condition Property="Selector.IsSelected" Value="False" />
                            </MultiTrigger.Conditions>
                            <Setter Property="Opacity" TargetName="HoverBorder" Value="1" />
                        </MultiTrigger>
                        <Trigger Property="IsSelected" Value="True">
                            <Setter Property="Panel.ZIndex" Value="100" />
                            <Setter Property="Opacity" TargetName="SelectedBorder" Value="1" />
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsMouseOver" Value="True" SourceName="grid" />
                                <Condition Property="Selector.IsSelected" Value="True" />
                            </MultiTrigger.Conditions>
                        </MultiTrigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="Foreground" Value="{DynamicResource DisabledForegroundBrush}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Foreground" Value="{DynamicResource WhiteBrush}" />
        <Style.Triggers>
            <Trigger Property="Selector.IsSelected" Value="True">
                <Setter Property="Foreground" Value="{DynamicResource BlackBrush}" />
            </Trigger>
        </Style.Triggers>
    </Style>


    <Style TargetType="{x:Type ToggleButton}">
        <Setter Property="FocusVisualStyle" Value="{StaticResource NuclearButtonFocusVisual}" />
        <Setter Property="Background" Value="{StaticResource SelectedTabItemBrush}" />
        <Setter Property="BorderBrush" Value="{StaticResource TabBorderBrush}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="Foreground">
            <Setter.Value>
                <SolidColorBrush Color="{DynamicResource BlackColor}" />
            </Setter.Value>
        </Setter>
        <Setter Property="HorizontalContentAlignment" Value="Center" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="Padding" Value="1" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ToggleButton}">
                    <ControlTemplate.Resources>
                    </ControlTemplate.Resources>
                    <Grid>

                        <Border x:Name="Border" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}" Background="{DynamicResource NormalBrush}" CornerRadius="3,3,3,3" BorderBrush="#AAA" />
                        <Border x:Name="Selected" BorderThickness="2" Padding="{TemplateBinding Padding}" Background="{DynamicResource MouseOverBrush}" CornerRadius="3,3,3,3" BorderBrush="{DynamicResource TabBorderBrush}" Opacity="0" />
                        <Border x:Name="Hover" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}" CornerRadius="3,3,3,3" BorderBrush="{DynamicResource LightBorderBrush}" Opacity="0">
                            <Border.Background>
                                <SolidColorBrush Color="{DynamicResource BlackColor}" />
                            </Border.Background>
                        </Border>
                        <Border x:Name="Pressed" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}" CornerRadius="3,3,3,3" BorderBrush="{DynamicResource LightBorderBrush}" Opacity="0">
                            <Border.Background>
                                <SolidColorBrush Color="{DynamicResource WhiteColor}" />
                            </Border.Background>
                        </Border>

                        <ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" RecognizesAccessKey="True" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="4,4,4,4" />
                    </Grid>

                    <ControlTemplate.Triggers>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter Property="Opacity" TargetName="Pressed" Value="0.6" />
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Opacity" TargetName="Hover" Value="0.1" />
                        </Trigger>
                        <Trigger Property="IsKeyboardFocused" Value="true" />
                        <Trigger Property="IsChecked" Value="true">

                            <Setter Property="Opacity" TargetName="Selected" Value="1" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Foreground" Value="#ADADAD" />
                            <Setter Property="Background" TargetName="Border" Value="{DynamicResource DisabledBackgroundBrush}" />
                            <Setter Property="BorderBrush" TargetName="Border" Value="{DynamicResource DisabledBorderBrush}" />
                            <Setter Property="Background" TargetName="Selected" Value="{DynamicResource DisabledBackgroundBrush}" />
                            <Setter Property="BorderBrush" TargetName="Selected" Value="{DynamicResource DisabledBorderBrush}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <DrawingBrush x:Key="WindowBackgroundBrush1" TileMode="Tile" Stretch="None">
        <DrawingBrush.Drawing>
            <DrawingGroup>
                <GeometryDrawing Brush="#FF2B3C59">
                    <GeometryDrawing.Geometry>
                        <RectangleGeometry Rect="0,0,11.438,12.125" />
                    </GeometryDrawing.Geometry>
                </GeometryDrawing>
                <DrawingGroup>
                    <DrawingGroup.Transform>
                        <MatrixTransform Matrix="1,0,0,1,4.834,0.792" />
                    </DrawingGroup.Transform>
                    <GeometryDrawing Brush="#FF293956">
                        <GeometryDrawing.Geometry>
                            <RectangleGeometry RadiusX="0" RadiusY="0" Rect="0,0,1.19999999999999,1.2" />
                        </GeometryDrawing.Geometry>
                    </GeometryDrawing>
                </DrawingGroup>
                <DrawingGroup>
                    <DrawingGroup.Transform>
                        <MatrixTransform Matrix="1,0,0,1,4.834,1.992" />
                    </DrawingGroup.Transform>
                    <GeometryDrawing Brush="#FF35496A">
                        <GeometryDrawing.Geometry>
                            <RectangleGeometry RadiusX="0" RadiusY="0" Rect="0,0,1.19999999999999,1.2" />
                        </GeometryDrawing.Geometry>
                    </GeometryDrawing>
                </DrawingGroup>
                <DrawingGroup>
                    <DrawingGroup.Transform>
                        <MatrixTransform Matrix="1,0,0,1,2.063,4.667" />
                    </DrawingGroup.Transform>
                    <GeometryDrawing Brush="#FF293956">
                        <GeometryDrawing.Geometry>
                            <RectangleGeometry RadiusX="0" RadiusY="0" Rect="0,0,1.2,1.2" />
                        </GeometryDrawing.Geometry>
                    </GeometryDrawing>
                </DrawingGroup>
                <DrawingGroup>
                    <DrawingGroup.Transform>
                        <MatrixTransform Matrix="1,0,0,1,2.063,5.867" />
                    </DrawingGroup.Transform>
                    <GeometryDrawing Brush="#FF35496A">
                        <GeometryDrawing.Geometry>
                            <RectangleGeometry RadiusX="0" RadiusY="0" Rect="0,0,1.2,1.2" />
                        </GeometryDrawing.Geometry>
                    </GeometryDrawing>
                </DrawingGroup>
                <DrawingGroup>
                    <DrawingGroup.Transform>
                        <MatrixTransform Matrix="1,0,0,1,8.22999999999999,4.667" />
                    </DrawingGroup.Transform>
                    <GeometryDrawing Brush="#FF293956">
                        <GeometryDrawing.Geometry>
                            <RectangleGeometry RadiusX="0" RadiusY="0" Rect="0,0,1.2,1.2" />
                        </GeometryDrawing.Geometry>
                    </GeometryDrawing>
                </DrawingGroup>
                <DrawingGroup>
                    <DrawingGroup.Transform>
                        <MatrixTransform Matrix="1,0,0,1,8.22999999999999,5.867" />
                    </DrawingGroup.Transform>
                    <GeometryDrawing Brush="#FF35496A">
                        <GeometryDrawing.Geometry>
                            <RectangleGeometry RadiusX="0" RadiusY="0" Rect="0,0,1.2,1.2" />
                        </GeometryDrawing.Geometry>
                    </GeometryDrawing>
                </DrawingGroup>
                <DrawingGroup>
                    <DrawingGroup.Transform>
                        <MatrixTransform Matrix="1,0,0,1,4.834,8.7" />
                    </DrawingGroup.Transform>
                    <GeometryDrawing Brush="#FF293956">
                        <GeometryDrawing.Geometry>
                            <RectangleGeometry RadiusX="0" RadiusY="0" Rect="0,0,1.19999999999999,1.2" />
                        </GeometryDrawing.Geometry>
                    </GeometryDrawing>
                </DrawingGroup>
                <DrawingGroup>
                    <DrawingGroup.Transform>
                        <MatrixTransform Matrix="1,0,0,1,4.834,9.9" />
                    </DrawingGroup.Transform>
                    <GeometryDrawing Brush="#FF35496A">
                        <GeometryDrawing.Geometry>
                            <RectangleGeometry RadiusX="0" RadiusY="0" Rect="0,0,1.19999999999999,1.2" />
                        </GeometryDrawing.Geometry>
                    </GeometryDrawing>
                </DrawingGroup>
            </DrawingGroup>
        </DrawingBrush.Drawing>
    </DrawingBrush>

    <!-- New Core Controls -->

    <Style x:Key="{ComponentResourceKey ResourceId=DataGridSelectAllButtonStyle, TypeInTargetAssembly={x:Type DataGrid}}" TargetType="{x:Type Button}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <ControlTemplate.Resources>
                        <Storyboard x:Key="HoverOn">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="HoverBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="HoverOff">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="HoverBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="PressedOn">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="PressedBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="PressedOff">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="PressedBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </ControlTemplate.Resources>
                    <Grid>

                        <Border x:Name="Border" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" />
                        <Border x:Name="HoverBorder" BorderBrush="{x:Null}" Background="{DynamicResource SelectedTabItemBrush}" Opacity="0" />
                        <Border x:Name="PressedBorder" Opacity="0" Background="{DynamicResource PressedBrush}" BorderBrush="{DynamicResource PressedBorderBrush}" BorderThickness="1" />
                        <Polygon x:Name="Arrow" Fill="Black" HorizontalAlignment="Right" Margin="8,8,3,3" Opacity="0.15" Points="0,10 10,10 10,0" Stretch="Uniform" VerticalAlignment="Bottom"/>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Trigger.ExitActions>
                                <BeginStoryboard x:Name="HoverOff_BeginStoryboard" Storyboard="{StaticResource HoverOff}" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOn}" />
                            </Trigger.EnterActions>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="true">
                            <Trigger.ExitActions>
                                <BeginStoryboard x:Name="PressedOff_BeginStoryboard" Storyboard="{StaticResource PressedOff}" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard x:Name="PressedOn_BeginStoryboard" Storyboard="{StaticResource PressedOn}" />
                            </Trigger.EnterActions>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="Visibility" TargetName="Arrow" Value="Collapsed"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="{x:Type DataGrid}">
        <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
        <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
        <Setter Property="BorderBrush" Value="#FF688CAF"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="RowDetailsVisibilityMode" Value="VisibleWhenSelected"/>
        <Setter Property="ScrollViewer.CanContentScroll" Value="true"/>
        <Setter Property="ScrollViewer.PanningMode" Value="Both"/>
        <Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type DataGrid}">
                    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="True">
                        <ScrollViewer x:Name="DG_ScrollViewer" Focusable="false">
                            <ScrollViewer.Template>
                                <ControlTemplate TargetType="{x:Type ScrollViewer}">
                                    <Grid>
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="Auto"/>
                                            <ColumnDefinition Width="*"/>
                                            <ColumnDefinition Width="Auto"/>
                                        </Grid.ColumnDefinitions>
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="Auto"/>
                                            <RowDefinition Height="*"/>
                                            <RowDefinition Height="Auto"/>
                                        </Grid.RowDefinitions>
                                        <Button Command="{x:Static DataGrid.SelectAllCommand}" Focusable="false" Style="{DynamicResource {ComponentResourceKey ResourceId=DataGridSelectAllButtonStyle, TypeInTargetAssembly={x:Type DataGrid}}}" Visibility="{Binding HeadersVisibility, ConverterParameter={x:Static DataGridHeadersVisibility.All}, Converter={x:Static DataGrid.HeadersVisibilityConverter}, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}" Width="{Binding CellsPanelHorizontalOffset, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
                                        <DataGridColumnHeadersPresenter x:Name="PART_ColumnHeadersPresenter" Grid.Column="1" Visibility="{Binding HeadersVisibility, ConverterParameter={x:Static DataGridHeadersVisibility.Column}, Converter={x:Static DataGrid.HeadersVisibilityConverter}, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
                                        <ScrollContentPresenter x:Name="PART_ScrollContentPresenter" CanContentScroll="{TemplateBinding CanContentScroll}" Grid.ColumnSpan="2" Grid.Row="1"/>
                                        <ScrollBar x:Name="PART_VerticalScrollBar" Grid.Column="2" Maximum="{TemplateBinding ScrollableHeight}" Orientation="Vertical" Grid.Row="1" Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" Value="{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" ViewportSize="{TemplateBinding ViewportHeight}"/>
                                        <Grid Grid.Column="1" Grid.Row="2">
                                            <Grid.ColumnDefinitions>
                                                <ColumnDefinition Width="{Binding NonFrozenColumnsViewportHorizontalOffset, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
                                                <ColumnDefinition Width="*"/>
                                            </Grid.ColumnDefinitions>
                                            <ScrollBar x:Name="PART_HorizontalScrollBar" Grid.Column="1" Maximum="{TemplateBinding ScrollableWidth}" Orientation="Horizontal" Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}" Value="{Binding HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" ViewportSize="{TemplateBinding ViewportWidth}"/>
                                        </Grid>
                                    </Grid>
                                </ControlTemplate>
                            </ScrollViewer.Template>
                            <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                        </ScrollViewer>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="IsGrouping" Value="true">
                <Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style x:Key="ColumnHeaderGripperStyle" TargetType="{x:Type Thumb}">
        <Setter Property="Width" Value="8"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="Cursor" Value="SizeWE"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Thumb}">
                    <Border Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="{x:Type DataGridColumnHeader}">
        <Setter Property="Background" Value="{DynamicResource SelectionInactiveBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource SelectionInactiveBorderBrush}" />
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type DataGridColumnHeader}">
                    <ControlTemplate.Resources>
                        <Storyboard x:Key="HoverOn">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="HoverBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="HoverOff">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="HoverBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="PressedOn">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="PressedBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="PressedOff">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="PressedBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </ControlTemplate.Resources>
                    <Grid>
                        <Border x:Name="Border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}" CornerRadius="2" />
                        <Border x:Name="HoverBorder" BorderBrush="{x:Null}" BorderThickness="1" Background="{DynamicResource SelectedTabItemBrush}" CornerRadius="2" Opacity="0" />
                        <Border x:Name="PressedBorder" Opacity="0" Background="{DynamicResource PressedBrush}" BorderBrush="{DynamicResource PressedBorderBrush}" BorderThickness="1" CornerRadius="2" />
                        <themes:DataGridHeaderBorder BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1,0,1,0" IsClickable="{TemplateBinding CanUserSort}" IsPressed="{TemplateBinding IsPressed}" IsHovered="{TemplateBinding IsMouseOver}" Padding="{TemplateBinding Padding}" SortDirection="{TemplateBinding SortDirection}" SeparatorBrush="{TemplateBinding SeparatorBrush}" SeparatorVisibility="{TemplateBinding SeparatorVisibility}">
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition/>
                                    <ColumnDefinition Width="Auto"/>
                                </Grid.ColumnDefinitions>
                                <ContentPresenter Margin="4" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                                <Path x:Name="SortArrow" Data="M0,0 L1,0 0.5,1 z" Stretch="Fill" 
						Grid.Column="1" Width="8" Height="6" Fill="{DynamicResource GlyphBrush}" 
						VerticalAlignment="Center" RenderTransformOrigin="0.5,0.4" HorizontalAlignment="Right" Visibility="Collapsed" Margin="0,0,8,0" />
                            </Grid>
                        </themes:DataGridHeaderBorder>
                        <Thumb x:Name="PART_LeftHeaderGripper" HorizontalAlignment="Left" Style="{StaticResource ColumnHeaderGripperStyle}"/>
                        <Thumb x:Name="PART_RightHeaderGripper" HorizontalAlignment="Right" Style="{StaticResource ColumnHeaderGripperStyle}"/>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Trigger.ExitActions>
                                <BeginStoryboard x:Name="HoverOff_BeginStoryboard" Storyboard="{StaticResource HoverOff}" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOn}" />
                            </Trigger.EnterActions>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="true">
                            <Trigger.ExitActions>
                                <BeginStoryboard x:Name="PressedOff_BeginStoryboard" Storyboard="{StaticResource PressedOff}" />
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard x:Name="PressedOn_BeginStoryboard" Storyboard="{StaticResource PressedOn}" />
                            </Trigger.EnterActions>
                        </Trigger>
                        <Trigger Property="SortDirection" Value="Ascending">
                            <Setter TargetName="SortArrow" Property="Visibility" Value="Visible" />
                            <Setter TargetName="SortArrow" Property="RenderTransform">
                                <Setter.Value>
                                    <RotateTransform Angle="180" />
                                </Setter.Value>
                            </Setter>
                            <Setter Property="Opacity" TargetName="PressedBorder" Value="0.6"/>
                        </Trigger>
                        <Trigger Property="SortDirection" Value="Descending">
                            <Setter TargetName="SortArrow" Property="Visibility" Value="Visible" />
                            <Setter Property="Opacity" TargetName="PressedBorder" Value="0.6"/>
                        </Trigger>
                        <Trigger Property="DisplayIndex" Value="0">
                            <Setter Property="Visibility" Value="Collapsed" 
                                    TargetName="PART_LeftHeaderGripper"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="{x:Type DataGridRow}">
        <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/>
        <Setter Property="SnapsToDevicePixels" Value="true"/>
        <Setter Property="Validation.ErrorTemplate" Value="{x:Null}"/>
        <Setter Property="ValidationErrorTemplate">
            <Setter.Value>
                <ControlTemplate>
                    <TextBlock Foreground="Red" Margin="2,0,0,0" Text="!" VerticalAlignment="Center"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type DataGridRow}">
                    <Grid>
                        <Border x:Name="SelectedBorder" BorderThickness="1" Opacity="0" Background="{x:Null}" BorderBrush="{DynamicResource PressedBorderBrush}" CornerRadius="2">
                            <Border BorderBrush="White" BorderThickness="1" Background="{DynamicResource ItemSelectedBrush}" CornerRadius="2" />
                        </Border>
                        <Border x:Name="HoverBorder" BorderThickness="1" Opacity="0" Background="{DynamicResource ItemHoverBrush}" BorderBrush="{DynamicResource ItemSelectedBorderBrush}" CornerRadius="2" />
                        <Border x:Name="DGR_Border" SnapsToDevicePixels="True">
                            <SelectiveScrollingGrid>
                                <SelectiveScrollingGrid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto"/>
                                    <ColumnDefinition Width="*"/>
                                </SelectiveScrollingGrid.ColumnDefinitions>
                                <SelectiveScrollingGrid.RowDefinitions>
                                    <RowDefinition Height="*"/>
                                    <RowDefinition Height="Auto"/>
                                </SelectiveScrollingGrid.RowDefinitions>
                                <DataGridCellsPresenter Grid.Column="1" ItemsPanel="{TemplateBinding ItemsPanel}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                                <DataGridDetailsPresenter Grid.Column="1" Grid.Row="1" SelectiveScrollingGrid.SelectiveScrollingOrientation="{Binding AreRowDetailsFrozen, ConverterParameter={x:Static SelectiveScrollingOrientation.Vertical}, Converter={x:Static DataGrid.RowDetailsScrollingConverter}, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}" Visibility="{TemplateBinding DetailsVisibility}"/>
                                <ContentControl Grid.Column="1" Grid.Row="1" Foreground="White">
                                    <DataGridDetailsPresenter SelectiveScrollingGrid.SelectiveScrollingOrientation="{Binding
                    RelativeSource={RelativeSource AncestorType={x:Type DataGrid}},
                    Path=AreRowDetailsFrozen,
                    Converter={x:Static DataGrid.RowDetailsScrollingConverter},
                    ConverterParameter={x:Static SelectiveScrollingOrientation.Vertical}}" Visibility="{TemplateBinding DetailsVisibility}" />
                                </ContentControl>
                                <DataGridRowHeader Grid.RowSpan="2" SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical" Visibility="{Binding HeadersVisibility, ConverterParameter={x:Static DataGridHeadersVisibility.Row}, Converter={x:Static DataGrid.HeadersVisibilityConverter}, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
                            </SelectiveScrollingGrid>
                        </Border>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Opacity" TargetName="HoverBorder" Value="1"/>
                        </Trigger>
                        <Trigger Property="IsSelected" Value="True">
                            <Setter Property="Opacity" TargetName="SelectedBorder" Value="1"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <SolidColorBrush x:Key="{x:Static DataGrid.FocusBorderBrushKey}" Color="#FF000000"/>

    <Style TargetType="{x:Type DataGridCell}">
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type DataGridCell}">
                    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="True">
                        <ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="IsSelected" Value="True">
                <Setter Property="Foreground" Value="Black"/>
            </Trigger>
            <Trigger Property="IsKeyboardFocusWithin" Value="True">
                <Setter Property="BorderBrush" Value="{DynamicResource {x:Static DataGrid.FocusBorderBrushKey}}"/>
            </Trigger>
        </Style.Triggers>
    </Style>
    <BooleanToVisibilityConverter x:Key="bool2VisibilityConverter"/>
    <Style x:Key="RowHeaderGripperStyle" TargetType="{x:Type Thumb}">
        <Setter Property="Height" Value="8"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="Cursor" Value="SizeNS"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Thumb}">
                    <Border Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="{x:Type DataGridRowHeader}">
        <Setter Property="MinWidth" Value="20" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type DataGridRowHeader}">
                    <Grid >
                        <themes:DataGridHeaderBorder Background="#FFFFFFFF" BorderBrush="#FF000000" BorderThickness="0,1,1,0" Margin="0,-1,0,0" IsPressed="{TemplateBinding IsPressed}" IsHovered="{TemplateBinding IsMouseOver}" IsSelected="{TemplateBinding IsRowSelected}" Orientation="Horizontal" Padding="{TemplateBinding Padding}" SeparatorBrush="{TemplateBinding SeparatorBrush}" SeparatorVisibility="{TemplateBinding SeparatorVisibility}">
                            <Grid>
                                <StackPanel Orientation="Horizontal">
                                    <ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="Center"/>
                                    <Control SnapsToDevicePixels="false" Template="{Binding ValidationErrorTemplate, RelativeSource={RelativeSource AncestorType={x:Type DataGridRow}}}" Visibility="{Binding (Validation.HasError), Converter={StaticResource bool2VisibilityConverter}, RelativeSource={RelativeSource AncestorType={x:Type DataGridRow}}}"/>
                                </StackPanel>
                                <Border x:Name="Main" />
                                <Border x:Name="SelectedBorder" BorderThickness="1" Opacity="0" Background="{x:Null}" BorderBrush="{DynamicResource PressedBorderBrush}" CornerRadius="2">
                                    <Border BorderBrush="White" BorderThickness="1" Background="{DynamicResource ItemSelectedBrush}" CornerRadius="2" />
                                </Border>
                            </Grid>
                        </themes:DataGridHeaderBorder>
                        <Thumb x:Name="PART_TopHeaderGripper" Style="{StaticResource RowHeaderGripperStyle}" VerticalAlignment="Top"/>
                        <Thumb x:Name="PART_BottomHeaderGripper" Style="{StaticResource RowHeaderGripperStyle}" VerticalAlignment="Bottom"/>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsRowSelected" Value="True">


                            <Setter Property="Opacity" TargetName="SelectedBorder" Value="1" />


                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Background" TargetName="Main" Value="{DynamicResource ItemHoverBrush}" />
                            <Setter Property="Opacity" TargetName="Main" Value="1" />

                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="NuclearCalendarButton" TargetType="{x:Type CalendarButton}">
        <Setter Property="Background" Value="#FFBADDE9"/>
        <Setter Property="MinWidth" Value="40"/>
        <Setter Property="MinHeight" Value="42"/>
        <Setter Property="FontSize" Value="10"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type CalendarButton}">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0:0:0.1"/>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="HoverBorder"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To=".5" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Background"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="SelectionStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0"/>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Unselected"/>
                                <VisualState x:Name="Selected">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="SelectedBorder"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ActiveStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0"/>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Active"/>
                                <VisualState x:Name="Inactive">
                                    <Storyboard>
                                        <ColorAnimation Duration="0" To="#FF777777" Storyboard.TargetProperty="(TextElement.Foreground).(SolidColorBrush.Color)" Storyboard.TargetName="NormalText"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="CalendarButtonFocusStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0"/>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="CalendarButtonFocused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="CalendarButtonFocusVisual">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="CalendarButtonUnfocused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="CalendarButtonFocusVisual">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Unfocused"/>
                                <VisualState x:Name="Focused"/>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border x:Name="SelectedBorder" BorderThickness="1" Opacity="0" Background="{x:Null}" BorderBrush="{DynamicResource PressedBorderBrush}" CornerRadius="2">
                            <Border BorderBrush="White" BorderThickness="1" Background="{DynamicResource ItemSelectedBrush}" CornerRadius="2" />
                        </Border>
                        <Border x:Name="HoverBorder" BorderThickness="1" Opacity="0" Background="{DynamicResource ItemHoverBrush}" BorderBrush="{DynamicResource ItemSelectedBorderBrush}" CornerRadius="2" />
                        <Rectangle x:Name="SelectedBackground" Fill="{TemplateBinding Background}" Opacity="0" RadiusY="1" RadiusX="1"/>
                        <Rectangle x:Name="Background" Fill="{TemplateBinding Background}" Opacity="0" RadiusY="1" RadiusX="1"/>
                        <ContentPresenter x:Name="NormalText" TextElement.Foreground="#FF333333" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="1,0,1,1" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                        <Rectangle x:Name="CalendarButtonFocusVisual" IsHitTestVisible="false" RadiusY="1" RadiusX="1" Stroke="{DynamicResource ItemSelectedBorderBrush}" Visibility="Collapsed"/>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsFocused" Value="True">
                            <Setter Property="Visibility" TargetName="CalendarButtonFocusVisual" Value="Visible"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="NuclearCalendarDayButton" TargetType="{x:Type CalendarDayButton}">
        <Setter Property="MinWidth" Value="5"/>
        <Setter Property="MinHeight" Value="5"/>
        <Setter Property="FontSize" Value="10"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type CalendarDayButton}">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0:0:0.1"/>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="HoverBorder"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="HighlightBackground"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="HighlightBackground"/>
                                        <DoubleAnimation Duration="0" To=".35" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="NormalText"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="SelectionStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0"/>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Unselected"/>
                                <VisualState x:Name="Selected">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="SelectedBorder"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="CalendarButtonFocusStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0"/>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="CalendarButtonFocused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="DayButtonFocusVisual">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="CalendarButtonUnfocused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="DayButtonFocusVisual">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ActiveStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0"/>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Active"/>
                                <VisualState x:Name="Inactive">
                                    <Storyboard>
                                        <ColorAnimation Duration="0" To="#FF777777" Storyboard.TargetProperty="(TextElement.Foreground).(SolidColorBrush.Color)" Storyboard.TargetName="NormalText"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="DayStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0"/>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="RegularDay"/>
                                <VisualState x:Name="Today">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="TodayBackground"/>
                                        <ColorAnimation Duration="0" To="#FFFFFFFF" Storyboard.TargetProperty="(TextElement.Foreground).(SolidColorBrush.Color)" Storyboard.TargetName="NormalText"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="BlackoutDayStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0"/>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="NormalDay"/>
                                <VisualState x:Name="BlackoutDay">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To=".2" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Blackout"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border x:Name="SelectedBorder" BorderThickness="1" Opacity="0" Background="{x:Null}" BorderBrush="{DynamicResource PressedBorderBrush}" CornerRadius="2">
                            <Border BorderBrush="White" BorderThickness="1" Background="{DynamicResource ItemSelectedBrush}" CornerRadius="2" />
                        </Border>
                        <Border x:Name="HoverBorder" BorderThickness="1" Opacity="0" Background="{DynamicResource ItemHoverBrush}" BorderBrush="{DynamicResource ItemSelectedBorderBrush}" CornerRadius="2" />
                        <Rectangle x:Name="TodayBackground" Fill="#FFAAAAAA" Opacity="0" RadiusY="1" RadiusX="1"/>
                        <Rectangle x:Name="SelectedBackground" Fill="#FFBADDE9" Opacity="0" RadiusY="1" RadiusX="1"/>
                        <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}"/>
                        <Rectangle x:Name="HighlightBackground" Fill="#FFBADDE9" Opacity="0" RadiusY="1" RadiusX="1"/>
                        <ContentPresenter x:Name="NormalText" TextElement.Foreground="#FF333333" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="5,1,5,1" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                        <Path x:Name="Blackout" Data="M8.1772461,11.029181 L10.433105,11.029181 L11.700684,12.801641 L12.973633,11.029181 L15.191895,11.029181 L12.844727,13.999395 L15.21875,17.060919 L12.962891,17.060919 L11.673828,15.256231 L10.352539,17.060919 L8.1396484,17.060919 L10.519043,14.042364 z" Fill="#FF000000" HorizontalAlignment="Stretch" Margin="3" Opacity="0" RenderTransformOrigin="0.5,0.5" Stretch="Fill" VerticalAlignment="Stretch"/>
                        <Rectangle x:Name="DayButtonFocusVisual" IsHitTestVisible="false" RadiusY="1" RadiusX="1" Stroke="{DynamicResource ItemSelectedBorderBrush}" Visibility="Collapsed"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="NuclearCalendar" TargetType="{x:Type Calendar}">
        <Setter Property="Foreground" Value="#FF333333"/>
        <Setter Property="Background" Value="{DynamicResource WhiteBrush}"/>
        <Setter Property="BorderBrush">
            <Setter.Value>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="#FFA3AEB9" Offset="0"/>
                    <GradientStop Color="#FF8399A9" Offset="0.375"/>
                    <GradientStop Color="#FF718597" Offset="0.375"/>
                    <GradientStop Color="#FF617584" Offset="1"/>
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Calendar}">
                    <StackPanel x:Name="PART_Root" HorizontalAlignment="Center">
                        <CalendarItem x:Name="PART_CalendarItem" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}"/>
                    </StackPanel>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="CalendarButtonStyle" Value="{DynamicResource NuclearCalendarButton}"/>
        <Setter Property="CalendarDayButtonStyle" Value="{DynamicResource NuclearCalendarDayButton}"/>
    </Style>

    <Style TargetType="{x:Type Calendar}">
        <Setter Property="Foreground" Value="#FF333333"/>
        <Setter Property="Background" Value="{DynamicResource WhiteBrush}"/>
        <Setter Property="BorderBrush">
            <Setter.Value>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="#FFA3AEB9" Offset="0"/>
                    <GradientStop Color="#FF8399A9" Offset="0.375"/>
                    <GradientStop Color="#FF718597" Offset="0.375"/>
                    <GradientStop Color="#FF617584" Offset="1"/>
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Calendar}">
                    <StackPanel x:Name="PART_Root" HorizontalAlignment="Center">
                        <CalendarItem x:Name="PART_CalendarItem" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}"/>
                    </StackPanel>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="CalendarButtonStyle" Value="{DynamicResource NuclearCalendarButton}"/>
        <Setter Property="CalendarDayButtonStyle" Value="{DynamicResource NuclearCalendarDayButton}"/>
    </Style>

    <Style TargetType="CalendarItem">
        <Setter Property="Margin" Value="0,3,0,3"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="CalendarItem">
                    <ControlTemplate.Resources>
                        <DataTemplate x:Key="{x:Static CalendarItem.DayTitleTemplateResourceKey}">
                            <TextBlock Foreground="#FF333333" FontWeight="Bold" FontSize="9.5" FontFamily="Verdana" HorizontalAlignment="Center" Margin="0,6,0,6" Text="{Binding}" VerticalAlignment="Center"/>
                        </DataTemplate>
                    </ControlTemplate.Resources>
                    <Grid x:Name="PART_Root">
                        <Grid.Resources>
                            <SolidColorBrush x:Key="DisabledColor" Color="#A5FFFFFF"/>
                        </Grid.Resources>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="PART_DisabledVisual"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="1">
                            <Border BorderBrush="#FFFFFFFF" BorderThickness="2" CornerRadius="1">
                                <Grid>
                                    <Grid.Resources>
                                        <ControlTemplate x:Key="PreviousButtonTemplate" TargetType="{x:Type Button}">
                                            <Grid Cursor="Hand">
                                                <VisualStateManager.VisualStateGroups>
                                                    <VisualStateGroup x:Name="CommonStates">
                                                        <VisualState x:Name="Normal"/>
                                                        <VisualState x:Name="MouseOver">
                                                            <Storyboard>
                                                                <ColorAnimation Duration="0" To="#FF73A9D8" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="path"/>
                                                            </Storyboard>
                                                        </VisualState>
                                                        <VisualState x:Name="Disabled">
                                                            <Storyboard>
                                                                <DoubleAnimation Duration="0" To=".5" Storyboard.TargetProperty="(Shape.Fill).(Brush.Opacity)" Storyboard.TargetName="path"/>
                                                            </Storyboard>
                                                        </VisualState>
                                                    </VisualStateGroup>
                                                </VisualStateManager.VisualStateGroups>
                                                <Rectangle Fill="#11E5EBF1" Opacity="1" Stretch="Fill"/>
                                                <Grid>
                                                    <Path x:Name="path" Data="M288.75,232.25 L288.75,240.625 L283,236.625 z" Fill="#FF333333" HorizontalAlignment="Left" Height="10" Margin="14,-6,0,0" Stretch="Fill" VerticalAlignment="Center" Width="6"/>
                                                </Grid>
                                            </Grid>
                                        </ControlTemplate>
                                        <ControlTemplate x:Key="NextButtonTemplate" TargetType="{x:Type Button}">
                                            <Grid Cursor="Hand">
                                                <VisualStateManager.VisualStateGroups>
                                                    <VisualStateGroup x:Name="CommonStates">
                                                        <VisualState x:Name="Normal"/>
                                                        <VisualState x:Name="MouseOver">
                                                            <Storyboard>
                                                                <ColorAnimation Duration="0" To="#FF73A9D8" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="path"/>
                                                            </Storyboard>
                                                        </VisualState>
                                                        <VisualState x:Name="Disabled">
                                                            <Storyboard>
                                                                <DoubleAnimation Duration="0" To=".5" Storyboard.TargetProperty="(Shape.Fill).(Brush.Opacity)" Storyboard.TargetName="path"/>
                                                            </Storyboard>
                                                        </VisualState>
                                                    </VisualStateGroup>
                                                </VisualStateManager.VisualStateGroups>
                                                <Rectangle Fill="#11E5EBF1" Opacity="1" Stretch="Fill"/>
                                                <Grid>
                                                    <Path x:Name="path" Data="M282.875,231.875 L282.875,240.375 L288.625,236 z" Fill="#FF333333" HorizontalAlignment="Right" Height="10" Margin="0,-6,14,0" Stretch="Fill" VerticalAlignment="Center" Width="6"/>
                                                </Grid>
                                            </Grid>
                                        </ControlTemplate>
                                        <ControlTemplate x:Key="HeaderButtonTemplate" TargetType="{x:Type Button}">
                                            <Grid Cursor="Hand">
                                                <VisualStateManager.VisualStateGroups>
                                                    <VisualStateGroup x:Name="CommonStates">
                                                        <VisualState x:Name="Normal"/>
                                                        <VisualState x:Name="MouseOver">
                                                            <Storyboard>
                                                                <ColorAnimation Duration="0" To="#FF73A9D8" Storyboard.TargetProperty="(TextElement.Foreground).(SolidColorBrush.Color)" Storyboard.TargetName="buttonContent"/>
                                                            </Storyboard>
                                                        </VisualState>
                                                        <VisualState x:Name="Disabled">
                                                            <Storyboard>
                                                                <DoubleAnimation Duration="0" To=".5" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="buttonContent"/>
                                                            </Storyboard>
                                                        </VisualState>
                                                    </VisualStateGroup>
                                                </VisualStateManager.VisualStateGroups>
                                                <ContentPresenter x:Name="buttonContent" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" TextElement.Foreground="#FF333333" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="1,4,1,9" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                                            </Grid>
                                        </ControlTemplate>
                                    </Grid.Resources>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto"/>
                                        <ColumnDefinition Width="Auto"/>
                                        <ColumnDefinition Width="Auto"/>
                                    </Grid.ColumnDefinitions>
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto"/>
                                        <RowDefinition Height="*"/>
                                    </Grid.RowDefinitions>
                                    <Button x:Name="PART_PreviousButton" Grid.Column="0" Focusable="False" HorizontalAlignment="Left" Height="20" Grid.Row="0" Width="28" >
                                        <Grid Cursor="Hand">
                                            <Rectangle Fill="#11E5EBF1" Opacity="1" Stretch="Fill"/>
                                            <Grid>
                                                <Path x:Name="previouspath" Data="M288.75,232.25 L288.75,240.625 L283,236.625 z" Fill="{DynamicResource GlyphBrush}" HorizontalAlignment="Center" Height="10" Stretch="Fill" VerticalAlignment="Center" Width="6"/>
                                            </Grid>
                                        </Grid>
                                    </Button>
                                    <Button x:Name="PART_HeaderButton" Grid.Column="1" FontWeight="Bold" Focusable="False" FontSize="10.5" HorizontalAlignment="Stretch" Grid.Row="0" VerticalAlignment="Stretch"/>
                                    <Button x:Name="PART_NextButton" Grid.Column="2" Focusable="False" Height="20" Grid.Row="0" HorizontalAlignment="Right" Width="28" Margin="0,0,4,0" >
                                        <Grid Cursor="Hand">
                                            <Rectangle Fill="#11E5EBF1" Opacity="1" Stretch="Fill"/>
                                            <Grid>
                                                <Path x:Name="nextpath" Data="M282.875,231.875 L282.875,240.375 L288.625,236 z" Fill="{DynamicResource GlyphBrush}" HorizontalAlignment="Center" Height="10" Stretch="Fill" VerticalAlignment="Center" Width="6"/>
                                            </Grid>
                                        </Grid>
                                    </Button>
                                    <Grid x:Name="PART_MonthView" Grid.ColumnSpan="3" HorizontalAlignment="Center" Margin="6,-1,6,6" Grid.Row="1" Visibility="Visible">
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="Auto"/>
                                            <ColumnDefinition Width="Auto"/>
                                            <ColumnDefinition Width="Auto"/>
                                            <ColumnDefinition Width="Auto"/>
                                            <ColumnDefinition Width="Auto"/>
                                            <ColumnDefinition Width="Auto"/>
                                            <ColumnDefinition Width="Auto"/>
                                        </Grid.ColumnDefinitions>
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="Auto"/>
                                            <RowDefinition Height="Auto"/>
                                            <RowDefinition Height="Auto"/>
                                            <RowDefinition Height="Auto"/>
                                            <RowDefinition Height="Auto"/>
                                            <RowDefinition Height="Auto"/>
                                            <RowDefinition Height="Auto"/>
                                        </Grid.RowDefinitions>
                                    </Grid>
                                    <Grid x:Name="PART_YearView" Grid.ColumnSpan="3" HorizontalAlignment="Center" Margin="6,3,7,6" Grid.Row="1" Visibility="Hidden">
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="Auto"/>
                                            <ColumnDefinition Width="Auto"/>
                                            <ColumnDefinition Width="Auto"/>
                                            <ColumnDefinition Width="Auto"/>
                                        </Grid.ColumnDefinitions>
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="Auto"/>
                                            <RowDefinition Height="Auto"/>
                                            <RowDefinition Height="Auto"/>
                                        </Grid.RowDefinitions>
                                    </Grid>
                                </Grid>
                            </Border>
                        </Border>
                        <Rectangle x:Name="PART_DisabledVisual" Fill="{StaticResource DisabledColor}" Opacity="0" RadiusY="2" RadiusX="2" Stretch="Fill" Stroke="{StaticResource DisabledColor}" StrokeThickness="1" Visibility="Collapsed"/>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="Visibility" TargetName="PART_DisabledVisual" Value="Visible"/>
                        </Trigger>
                        <DataTrigger Binding="{Binding DisplayMode, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Calendar}}}" Value="Year">
                            <Setter Property="Visibility" TargetName="PART_MonthView" Value="Hidden"/>
                            <Setter Property="Visibility" TargetName="PART_YearView" Value="Visible"/>
                        </DataTrigger>
                        <DataTrigger Binding="{Binding DisplayMode, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Calendar}}}" Value="Decade">
                            <Setter Property="Visibility" TargetName="PART_MonthView" Value="Hidden"/>
                            <Setter Property="Visibility" TargetName="PART_YearView" Value="Visible"/>
                        </DataTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="{x:Type DatePicker}">
        <Setter Property="CalendarStyle" Value="{DynamicResource NuclearCalendar}" />
        <Setter Property="Foreground" Value="#FF333333"/>
        <Setter Property="IsTodayHighlighted" Value="True"/>
        <Setter Property="SelectedDateFormat" Value="Short"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="Padding" Value="2"/>
        <Setter Property="BorderBrush">
            <Setter.Value>
                <LinearGradientBrush EndPoint=".5,0" StartPoint=".5,1">
                    <GradientStop Color="#FFA3AEB9" Offset="0"/>
                    <GradientStop Color="#FF8399A9" Offset="0.375"/>
                    <GradientStop Color="#FF718597" Offset="0.375"/>
                    <GradientStop Color="#FF617584" Offset="1"/>
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type DatePicker}">
                    <Border BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="PART_DisabledVisual"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid x:Name="PART_Root" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
                            <Grid.Resources>
                                <SolidColorBrush x:Key="DisabledBrush" Color="#A5FFFFFF"/>
                                <ControlTemplate x:Key="DropDownButtonTemplate" TargetType="{x:Type Button}">
                                    <Grid>
                                        <VisualStateManager.VisualStateGroups>
                                            <VisualStateGroup x:Name="CommonStates">
                                                <VisualStateGroup.Transitions>
                                                    <VisualTransition GeneratedDuration="0"/>
                                                    <VisualTransition GeneratedDuration="0:0:0.1" To="MouseOver"/>
                                                    <VisualTransition GeneratedDuration="0:0:0.1" To="Pressed"/>
                                                </VisualStateGroup.Transitions>
                                                <VisualState x:Name="Normal"/>
                                                <VisualState x:Name="MouseOver">
                                                    <Storyboard>
                                                        <ColorAnimation Duration="0" To="#FF448DCA" Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)" Storyboard.TargetName="Background"/>
                                                        <ColorAnimationUsingKeyFrames BeginTime="0" Duration="00:00:00.001" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[3].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient">
                                                            <SplineColorKeyFrame KeyTime="0" Value="#7FFFFFFF"/>
                                                        </ColorAnimationUsingKeyFrames>
                                                        <ColorAnimationUsingKeyFrames BeginTime="0" Duration="00:00:00.001" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[2].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient">
                                                            <SplineColorKeyFrame KeyTime="0" Value="#CCFFFFFF"/>
                                                        </ColorAnimationUsingKeyFrames>
                                                        <ColorAnimationUsingKeyFrames BeginTime="0" Duration="00:00:00.001" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient">
                                                            <SplineColorKeyFrame KeyTime="0" Value="#F2FFFFFF"/>
                                                        </ColorAnimationUsingKeyFrames>
                                                    </Storyboard>
                                                </VisualState>
                                                <VisualState x:Name="Pressed">
                                                    <Storyboard>
                                                        <ColorAnimationUsingKeyFrames BeginTime="0" Duration="00:00:00.001" Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)" Storyboard.TargetName="Background">
                                                            <SplineColorKeyFrame KeyTime="0" Value="#FF448DCA"/>
                                                        </ColorAnimationUsingKeyFrames>
                                                        <DoubleAnimationUsingKeyFrames BeginTime="0" Duration="00:00:00.001" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Highlight">
                                                            <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                                        </DoubleAnimationUsingKeyFrames>
                                                        <ColorAnimationUsingKeyFrames BeginTime="0" Duration="00:00:00.001" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient">
                                                            <SplineColorKeyFrame KeyTime="0" Value="#EAFFFFFF"/>
                                                        </ColorAnimationUsingKeyFrames>
                                                        <ColorAnimationUsingKeyFrames BeginTime="0" Duration="00:00:00.001" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[2].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient">
                                                            <SplineColorKeyFrame KeyTime="0" Value="#C6FFFFFF"/>
                                                        </ColorAnimationUsingKeyFrames>
                                                        <ColorAnimationUsingKeyFrames BeginTime="0" Duration="00:00:00.001" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[3].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient">
                                                            <SplineColorKeyFrame KeyTime="0" Value="#6BFFFFFF"/>
                                                        </ColorAnimationUsingKeyFrames>
                                                        <ColorAnimationUsingKeyFrames BeginTime="0" Duration="00:00:00.001" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient">
                                                            <SplineColorKeyFrame KeyTime="0" Value="#F4FFFFFF"/>
                                                        </ColorAnimationUsingKeyFrames>
                                                    </Storyboard>
                                                </VisualState>
                                                <VisualState x:Name="Disabled"/>
                                            </VisualStateGroup>
                                        </VisualStateManager.VisualStateGroups>
                                        <Grid Background="#11FFFFFF" FlowDirection="LeftToRight" HorizontalAlignment="Center" Height="18" Margin="0" VerticalAlignment="Center" Width="19">
                                            <Grid.ColumnDefinitions>
                                                <ColumnDefinition Width="20*"/>
                                                <ColumnDefinition Width="20*"/>
                                                <ColumnDefinition Width="20*"/>
                                                <ColumnDefinition Width="20*"/>
                                            </Grid.ColumnDefinitions>
                                            <Grid.RowDefinitions>
                                                <RowDefinition Height="23*"/>
                                                <RowDefinition Height="19*"/>
                                                <RowDefinition Height="19*"/>
                                                <RowDefinition Height="19*"/>
                                            </Grid.RowDefinitions>
                                            <Border x:Name="Highlight" BorderBrush="#FF45D6FA" BorderThickness="1" Grid.ColumnSpan="4" CornerRadius="0,0,1,1" Margin="-1" Opacity="0" Grid.Row="0" Grid.RowSpan="4"/>
                                            <Border x:Name="Background" BorderBrush="#FFFFFFFF" BorderThickness="1" Background="#FF1F3B53" Grid.ColumnSpan="4" CornerRadius=".5" Margin="0,-1,0,0" Opacity="1" Grid.Row="1" Grid.RowSpan="3"/>
                                            <Border x:Name="BackgroundGradient" BorderBrush="#BF000000" BorderThickness="1" Grid.ColumnSpan="4" CornerRadius=".5" Margin="0,-1,0,0" Opacity="1" Grid.Row="1" Grid.RowSpan="3">
                                                <Border.Background>
                                                    <LinearGradientBrush EndPoint=".7,1" StartPoint=".7,0">
                                                        <GradientStop Color="#FFFFFFFF" Offset="0"/>
                                                        <GradientStop Color="#F9FFFFFF" Offset="0.375"/>
                                                        <GradientStop Color="#E5FFFFFF" Offset="0.625"/>
                                                        <GradientStop Color="#C6FFFFFF" Offset="1"/>
                                                    </LinearGradientBrush>
                                                </Border.Background>
                                            </Border>
                                            <Rectangle Grid.ColumnSpan="4" Grid.RowSpan="1" StrokeThickness="1">
                                                <Rectangle.Fill>
                                                    <LinearGradientBrush EndPoint="0.3,-1.1" StartPoint="0.46,1.6">
                                                        <GradientStop Color="#FF4084BD"/>
                                                        <GradientStop Color="#FFAFCFEA" Offset="1"/>
                                                    </LinearGradientBrush>
                                                </Rectangle.Fill>
                                                <Rectangle.Stroke>
                                                    <LinearGradientBrush EndPoint="0.48,-1" StartPoint="0.48,1.25">
                                                        <GradientStop Color="#FF494949"/>
                                                        <GradientStop Color="#FF9F9F9F" Offset="1"/>
                                                    </LinearGradientBrush>
                                                </Rectangle.Stroke>
                                            </Rectangle>
                                            <Path Grid.ColumnSpan="4" Grid.Column="0" Data="M11.426758,8.4305077 L11.749023,8.4305077 L11.749023,16.331387 L10.674805,16.331387 L10.674805,10.299648 L9.0742188,11.298672 L9.0742188,10.294277 C9.4788408,10.090176 9.9094238,9.8090878 10.365967,9.4510155 C10.82251,9.0929432 11.176106,8.7527733 11.426758,8.4305077 z M14.65086,8.4305077 L18.566387,8.4305077 L18.566387,9.3435936 L15.671368,9.3435936 L15.671368,11.255703 C15.936341,11.058764 16.27293,10.960293 16.681133,10.960293 C17.411602,10.960293 17.969301,11.178717 18.354229,11.615566 C18.739157,12.052416 18.931622,12.673672 18.931622,13.479336 C18.931622,15.452317 18.052553,16.438808 16.294415,16.438808 C15.560365,16.438808 14.951641,16.234707 14.468243,15.826504 L14.881817,14.929531 C15.368796,15.326992 15.837872,15.525723 16.289043,15.525723 C17.298809,15.525723 17.803692,14.895514 17.803692,13.635098 C17.803692,12.460618 17.305971,11.873379 16.310528,11.873379 C15.83071,11.873379 15.399232,12.079271 15.016094,12.491055 L14.65086,12.238613 z" Fill="#FF2F2F2F" HorizontalAlignment="Center" Margin="4,3,4,3" Grid.Row="1" Grid.RowSpan="3" RenderTransformOrigin="0.5,0.5" Stretch="Fill" VerticalAlignment="Center"/>
                                            <Ellipse Grid.ColumnSpan="4" Fill="#FFFFFFFF" HorizontalAlignment="Center" Height="3" StrokeThickness="0" VerticalAlignment="Center" Width="3"/>
                                            <Border x:Name="DisabledVisual" BorderBrush="#B2FFFFFF" BorderThickness="1" Grid.ColumnSpan="4" CornerRadius="0,0,.5,.5" Opacity="0" Grid.Row="0" Grid.RowSpan="4"/>
                                        </Grid>
                                    </Grid>
                                </ControlTemplate>
                            </Grid.Resources>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*"/>
                                <ColumnDefinition Width="Auto"/>
                            </Grid.ColumnDefinitions>
                            <Button x:Name="PART_Button" Grid.Column="1" Foreground="{TemplateBinding Foreground}" Focusable="False" HorizontalAlignment="Left" Margin="2,0,2,0" Grid.Row="0" VerticalAlignment="Top" Width="20" Template="{DynamicResource NuclearButton}">
                                <Grid Height="18" HorizontalAlignment="Center" Margin="0" VerticalAlignment="Center" Width="19" Background="{x:Null}">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="20*" />
                                        <ColumnDefinition Width="20*" />
                                        <ColumnDefinition Width="20*" />
                                        <ColumnDefinition Width="20*" />
                                    </Grid.ColumnDefinitions>
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="23*" />
                                        <RowDefinition Height="19*" />
                                        <RowDefinition Height="19*" />
                                        <RowDefinition Height="19*" />
                                    </Grid.RowDefinitions>
                                    <Border Grid.ColumnSpan="4" Grid.RowSpan="4" BorderThickness="1,1,1,1" CornerRadius="2,2,2,2" x:Name="MainBorder" />




                                    <Path HorizontalAlignment="Center" Margin="4,3,4,3" VerticalAlignment="Center" RenderTransformOrigin="0.5,0.5" Grid.Column="0" Grid.ColumnSpan="4" Grid.Row="1" Grid.RowSpan="3" Fill="{StaticResource GlyphBrush}" Stretch="Fill" Data="M11.426758,8.4305077 L11.749023,8.4305077 L11.749023,16.331387 L10.674805,16.331387 L10.674805,10.299648 L9.0742188,11.298672 L9.0742188,10.294277 C9.4788408,10.090176 9.9094238,9.8090878 10.365967,9.4510155 C10.82251,9.0929432 11.176106,8.7527733 11.426758,8.4305077 z M14.65086,8.4305077 L18.566387,8.4305077 L18.566387,9.3435936 L15.671368,9.3435936 L15.671368,11.255703 C15.936341,11.058764 16.27293,10.960293 16.681133,10.960293 C17.411602,10.960293 17.969301,11.178717 18.354229,11.615566 C18.739157,12.052416 18.931622,12.673672 18.931622,13.479336 C18.931622,15.452317 18.052553,16.438808 16.294415,16.438808 C15.560365,16.438808 14.951641,16.234707 14.468243,15.826504 L14.881817,14.929531 C15.368796,15.326992 15.837872,15.525723 16.289043,15.525723 C17.298809,15.525723 17.803692,14.895514 17.803692,13.635098 C17.803692,12.460618 17.305971,11.873379 16.310528,11.873379 C15.83071,11.873379 15.399232,12.079271 15.016094,12.491055 L14.65086,12.238613 z" />
                                    <Ellipse Height="3" HorizontalAlignment="Center" VerticalAlignment="Center" Width="3" Grid.ColumnSpan="4" Fill="{StaticResource GlyphBrush}" StrokeThickness="0" />

                                </Grid>
                            </Button>
                            <DatePickerTextBox x:Name="PART_TextBox" Grid.Column="0" Foreground="{TemplateBinding Foreground}" Focusable="{TemplateBinding Focusable}" HorizontalContentAlignment="Stretch" Grid.Row="0" VerticalContentAlignment="Stretch"/>
                            <Grid x:Name="PART_DisabledVisual" Grid.ColumnSpan="2" Grid.Column="0" IsHitTestVisible="False" Opacity="0" Grid.Row="0">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*"/>
                                    <ColumnDefinition Width="Auto"/>
                                </Grid.ColumnDefinitions>
                                <Rectangle Grid.Column="0" Fill="#A5FFFFFF" RadiusY="1" Grid.Row="0" RadiusX="1"/>
                                <Rectangle Grid.Column="1" Fill="#A5FFFFFF" Height="18" Margin="3,0,3,0" RadiusY="1" Grid.Row="0" RadiusX="1" Width="19"/>
                                <Popup x:Name="PART_Popup" AllowsTransparency="True" Placement="Bottom" PlacementTarget="{Binding ElementName=PART_TextBox}" StaysOpen="False"/>
                            </Grid>
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="{x:Type DatePickerTextBox}">
        <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"/>
        <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/>
        <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
        <Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type DatePickerTextBox}">
                    <Grid>
                        <Grid.Resources>
                            <SolidColorBrush x:Key="WatermarkBrush" Color="#FFAAAAAA"/>
                        </Grid.Resources>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0"/>
                                    <VisualTransition GeneratedDuration="0:0:0.1" To="MouseOver"/>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="HoverBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0.5" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="HoverInnerBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0.5" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="WatermarkStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0"/>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Unwatermarked"/>
                                <VisualState x:Name="Watermarked">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="ContentElement"/>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="PART_Watermark"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0"/>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Unfocused"/>
                                <VisualState x:Name="Focused">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="HoverBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1.0" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="HoverInnerBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1.0" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Rectangle HorizontalAlignment="Stretch" StrokeThickness="1" x:Name="Rectangle" VerticalAlignment="Stretch" Width="Auto" Height="Auto" Fill="{StaticResource WhiteBrush}" Stroke="{StaticResource ComboBoxBorderBrush}" />
                        <Rectangle HorizontalAlignment="Stretch" StrokeThickness="1" x:Name="HoverBorder" VerticalAlignment="Stretch" Width="Auto" Height="Auto" Stroke="{StaticResource PressedBorderBrush}" Opacity="0" Fill="{StaticResource ItemHoverBrush}" />
                        <Rectangle x:Name="HoverInnerBorder" Grid.Column="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="Auto" Height="Auto" Fill="{StaticResource WhiteBrush}" Stroke="{StaticResource PressedBorderBrush}" Opacity="0" StrokeThickness="1" />

                        <Grid x:Name="WatermarkContent" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="2">
                            <Border x:Name="ContentElement" />
                            <Border x:Name="watermark_decorator" >
                                <ContentControl x:Name="PART_Watermark" Focusable="False" IsHitTestVisible="False" Opacity="0" Padding="2"/>
                            </Border>
                            <ScrollViewer x:Name="PART_ContentHost" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="0" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/>
                            <Border x:Name="FocusVisual" BorderBrush="#FF45D6FA" CornerRadius="1" IsHitTestVisible="False" Opacity="0"/>
                        </Grid>

                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="GridSplitterPreviewStyle">
    	<Setter Property="Control.Template">
    		<Setter.Value>
    			<ControlTemplate>
    				<Rectangle Fill="#80000000"/>
    			</ControlTemplate>
    		</Setter.Value>
    	</Setter>
    </Style>
    <Style TargetType="GridSplitter">
        <Setter Property="Background">
            <Setter.Value>
                <SolidColorBrush Color="{StaticResource MainColor}"/>
            </Setter.Value>
        </Setter>
        <Setter Property="IsTabStop" Value="true"/>
        <Setter Property="HorizontalAlignment" Value="Right"/>
        <Setter Property="PreviewStyle">
            <Setter.Value>
                <Style TargetType="Control">
                    <Setter Property="Background" Value="#FF868686"/>
                    <Setter Property="Template">
                        <Setter.Value>
                            <ControlTemplate TargetType="Control">
                                <Grid x:Name="Root" Opacity=".5">
                                    <Rectangle Fill="{TemplateBinding Background}"/>
                                    <Grid x:Name="HorizontalTemplate" Height="6"/>
                                    <Grid x:Name="VerticalTemplate" Visibility="Collapsed" Width="6"/>
                                </Grid>
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="GridSplitter">
                    <Grid x:Name="Root" IsHitTestVisible="{TemplateBinding IsEnabled}">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver"/>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Root"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0"/>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Unfocused"/>
                                <VisualState x:Name="Focused">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="FocusVisual"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Rectangle Fill="{TemplateBinding Background}" StrokeThickness="0"/>
                        <Grid x:Name="HorizontalTemplate" Height="10">
                            <StackPanel Height="6" VerticalAlignment="Center">
                                <Rectangle Fill="{StaticResource LightBrush}" Height="1" Margin="1" StrokeThickness="0" Width="10"/>
                                <Rectangle Fill="{StaticResource LightBrush}" Height="1" Margin="1" StrokeThickness="0" Width="10"/>
                            </StackPanel>
                        </Grid>
                        <Grid x:Name="VerticalTemplate" Visibility="Collapsed" Width="10">
                            <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Width="6">
                                <Rectangle Fill="{StaticResource LightBrush}" Height="10" Margin="1" StrokeThickness="0" Width="1"/>
                                <Rectangle Fill="{StaticResource LightBrush}" Height="10" Margin="1" StrokeThickness="0" Width="1"/>
                            </StackPanel>
                        </Grid>
                        <Rectangle x:Name="FocusVisual" IsHitTestVisible="false" Opacity="0" Stroke="{StaticResource PressedBrush}" StrokeThickness="1"/>
                    </Grid>
					<ControlTemplate.Triggers>
						<Trigger Property="VerticalAlignment" Value="Stretch">
							<Setter TargetName="VerticalTemplate" Property="Visibility" Value="Visible" />
							<Setter TargetName="HorizontalTemplate" Property="Visibility" Value="Collapsed" />
						</Trigger>
						<Trigger Property="HorizontalAlignment" Value="Stretch">
							<Setter TargetName="HorizontalTemplate" Property="Visibility" Value="Visible" />
							<Setter TargetName="VerticalTemplate" Property="Visibility" Value="Collapsed" />
						</Trigger>
					</ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="{x:Type ContextMenu}">
        <Setter Property="SnapsToDevicePixels"
                Value="True" />
        <Setter Property="OverridesDefaultStyle"
                Value="True" />
        <Setter Property="Grid.IsSharedSizeScope"
                Value="true" />
        <Setter Property="HasDropShadow"
                Value="True" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ContextMenu}">
                    <Border x:Name="Border"
                            Background="{StaticResource MenuPopupBackgroundBrush}"
                            BorderBrush="{StaticResource NormalBorderBrush}"
                            BorderThickness="1">
                        <StackPanel IsItemsHost="True"
                                    KeyboardNavigation.DirectionalNavigation="Cycle" />
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="HasDropShadow"
                                 Value="true">
                            <Setter TargetName="Border"
                                    Property="Padding"
                                    Value="0,3,0,3" />
                            <Setter TargetName="Border"
                                    Property="CornerRadius"
                                    Value="4" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="DefaultWindowStyle" TargetType="{x:Type Window}">
        <Setter Property="Background" Value="{StaticResource WindowBrush}" />
    </Style>

</ResourceDictionary>